Call a Server-Side Workflow Rule in a Mobile App
Mobile Framework
Call a Server-Side Workflow Rule in a Mobile App
The mobile framework supports calling Web Central workflow rules using the existing Web Central workflow rule mechanism. Workflow rules can be called from the mobile device using the
Common.service.workflow.Workflow.execute()
function.
Example:
The
Maintenance.controller.WorkRequestSync
controller calls the workflow rules during the sync process using the
executeWorkFlowRules
function.
Ext.define('Maintenance.controller.WorkRequestSync', {
...
executeWorkFlowRules: function () {
var userName = ConfigFileManager.username,
userProfile = UserProfile.getUserProfile(),
cfId = userProfile.cf_id || '';
return Common.service.workflow.Workflow.execute('AbBldgOpsHelpDesk-MaintenanceMobileService-syncWorkData', [userName, cfId]);
},
File: ab-products/common/mobile/src/Maintenance/app/controller/WorkRequestSync.js
You may wish to make a second workflow rule call to accomodate, for example, a new transaction table added to the synchronization.