startBizAction
Start a business action and render its form in a specified container element.
Parameters
Parameter | Type | Description |
---|---|---|
StartBusinessActionServiceModel | StartBusinessActionServiceModel object | Data model to be used by the service request. The response renders the business action form in the specified StartBusinessActionServiceModel.formDiv element. |
callback | Function | Callback function to handle success results, failure results and events returned by the request. |
Callback Function
The callback function of the BPMBusinessActionsService.startBizAction operation supports the following methods:
- onSuccess: function(result): returns the business action data (in result) if the call succeeds.
- onFailure: function(exception): returns the exception thrown (in exception) if the call fails.
- onEvent: function(eventName,bizActionHandler): notifies the calling application of any event that occurs while processing the business action.
onEvent takes the following parameters:
- eventName identifies the event that has occurred. One of the following strings is returned.
- BizActionHandler is an object that provides the data for the started business action and the form data for the current page. See BizActionHandler.
For example:
if (BPMBusinessActionsService){ BPMBusinessActionsService.startBizAction(businessActionTemplate, {onSuccess: function(result){ }, onFailure: function(exception){ }, onEvent: function(eventName, bizActionHandler){ console.log("onEvent:"+ eventName); // Add any desired event handling code here. You can cancel the // processing pageflow and destroy the associated form using // the cancelPageflow method on the bizActionHandlerobject: // // bizActionHandler.cancelPageflow(); } }); }
Copyright © Cloud Software Group, Inc. All rights reserved.