SetEvent
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
<keywords content="keywords"> setEvent, setevent, setEventAsString, seteventasstring, set Event, set event, SOA Layer, soa layer, WorkflowEngineSOA, workflowenginesoa, Workflow Engine SOA, workflow engine soa </keywords>
Contents |
setEvent
A method from the WorkflowEngineSOA web service used to execute an available Event in Bizagi from an external application. This document also applies to the method setEventAsString.
Description
This method triggers one or more Event in Bizagi for one or several cases using an XML as input parameter, and at the same time it is possible to set business data for the events. The method setEvent receives and returns an XmlDocument while setEventAsString receives and returns an XML in string format.
Input Data
Here is the schema of the expected XML (copy it from here):
Parameter 1 (XmlDocument or String Type)
BizAgiWSParam: Root node.
domain: Here goes the name of the domain for the Bizagi user who will be registered as the performer of the triggered Event.
userName: Name of the user who will be register as performer of the triggered Event.
Events: Contains the information of all Events.
Event: Contains the information of a particular Event.
EventData: Contains all the necessary information to locate the Event.
idCase: Is the case identification number for the Event which wants to be triggered. It is required to include this element or the radNumber.
radNumber: An alternative to the idCase. It is the creation number (case number) of the case containing the pending Event that wants to be continued. When the same creation number is used for several cases (like when a subprocess uses its parent’s number) the idCase must be used to distinguish for which case the event belongs to.
taskId: It is the identification number for the Event which wants to be executed. This element is necessary; if this number is not known then the eventName must be included.
eventName: Use as a complement or alternative to taskId, it is the name of the pending Event which wants to be executed.
Entities: It is a node containing the values for the business data that is going to be set for the case.
Example
With the following XML the user domain\Raulp will trigger two Events for two different cases. An Event named Event2 of the case with creation number 501; and the Event with id 145 of the case with id 201. Additionally for the second Event, the attribute 'BuroScore' will be set to have the value '5959':
Output Data
The schema of the returned XML is this (copy it from here):
The response includes basic information of the case (and process) just continued. Here is the description of each data contained in the returned XML.
processes: Root element containing information about the processes to which the events belong.
process: This element includes information for a process.
processId: Identification number of the case (idCase).
processRadNumber: Alphanumeric value corresponding to the creation number of the case.
savedMessage: Reserved for future use.
Entities: Reserved for future use.
processWorkflowClass: The information in this node is all about the process (process metadata) not about the particular case.
workflowClassId: Identification number (or key) or the process.
workflowClassName: Name of the process.
workflowClassDisplayName: Display name of the process.
workflowClassDescription: Process description.
workflowClassHelpText: Process help text.
workflowClassHelpURL: Help URL for the process.
workflowClassDisplayOrder: The order in which the process will be viewed in Bizagi Studio.
workflowClassCreationDate: Creation date of the process.
workflowClassGlobalForm: Identification number of the process’s global form (zero if it is not configured).
workflowClassAllocationPrinciple: Reserved for future use.
workflowClassProcessType: Process type.
workflowClassDisplay: Indicates whether the process is visible or not.
workflowClassUseParentRadicationNumber: Indicates if a case of this process uses its own creation number or the same number as the parent process (if it is a subprocess).
processError: If the process of triggering the event is not successful, this element will contain information or the error.
errorCode: Code of the error that occurred, otherwise it will be empty.
errorMessage: Message of the error that occurred, otherwise it will be empty.
Path: XPath of the element, in the request XML, generating the error. Visible when the error is caused by wrong data.
Attrib: Is the name of the attribute in Bizagi where the saved operation was attempted. Visible when the error is caused by wrong data.
Value: Is the value which caused the error. Visible when the error is caused by wrong data.
ErrorMessage: Message explaining why the error occurred. Visible when the error is caused by wrong data.
CurrentWorkItems: The set of events or activities available for the case.
workItem: This is a specific event or activity (an instance of a task) of the process that is active for the case.
workItemId: Identification number or key of the event/activity.
workItemState: State in which the event/activity is.
workItemEntryDate: Date and time when the case reached this event/activity.
workItemDuration: Is the estimated duration, in minutes, for this event/activity.
workItemEstimatedSolutionDate: Is the case’s estimated solution date.
Task: Contains information about task corresponding to the event.
taskId: Identification number or key of the task.
taskName: Name of the task.
taskDisplayName: Display name of the task.
taskDescription: Task’s descriptive text.
taskHelpText: Task’s help text.
taskEstimatedDuration: Is the estimated duration, in minutes, for the task.
taskType: Type of task.
taskCost: The estimated cost of the task. This value, like the estimated dates, is configured and determined by the designer of the process.
taskPriority: Fulfillment priority of the task.
taskTransactional: An indicator stating if a task is transactional.
taskCompensation: Informs if this is a compensation task.
taskTimerEventDuration: If this is a timer task, it will contain its duration in minutes.
AllowsReassign: A mark showing if this task may be reassigned to another user.
SendNotification: Indicates if an email must be sent to a user informing of the availability of the task.
SendAlarms: Indicates if an email must be sent to the assigned user informing that the task is at risk of being overdue.
ExtendedEstimatedDuration: Estimated extended time duration.
Form: Reserved for future use.
IsAsynchTask: Specifies if this is an asynchronous task or no. Usually used for interfaces.
NumberOfRetries: Applies for asynchronous tasks. Is the number of automatic retries for the task in case it fails (an exception is thrown).
RetryInterval: Applies for asynchronous tasks. Is the time (in minutes) between each retry.
ShowFeedback: Applies for asynchronous tasks. Indicates if the user will be informed when an error occurs.
TimeoutSeconds: Applies for asynchronous tasks. Time (in seconds) the asynchronous task will wait for the external system to respond.
Example
Here is the XML in response to the one send as example:
Since this method is like clicking on the Next button in the user interface, under the element CurrentWorkItems is found the information of the activity where the case gets, in this example for both cases there are no more pending activities.
Related Articles
- View the performActivity web method definition to perform (advance) an Activity instead.
- Go to SOA Layer.
<comments />