pp108 : GetBusinessEvents

GetBusinessEvents

This Web service operation is used to obtain all the business events that can be raised in the context of all the active states. It allows to filter the events which can be raised from the context of an activity. The GetBusinessEvents is a part of the CaseInstanceExecution Web service interface with the namespace 'http://schemas.cordys.com/casemanagement/execution/1.0'.

SOAP Request

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <GetBusinessEvents xmlns="http://schemas.cordys.com/casemanagement/execution/1.0">
            <caseinstanceid>2I0C054B-E0FB-4DB4-B031-601EA31853AF</caseinstanceid>
            <activityid>2A0C054B-E0FB-4DB4-B031-601EA31853AF</activityid>
        </GetBusinessEvents>
    </SOAP:Body>
</SOAP:Envelope>
Request Parameters

Parameter

Description

Mandatory

Accepted Input Values

caseinstanceid

The instance ID of the Case model for which the business events must be retrieved. If caseinstanceid alone is passed as a parameter, the response will contain all the events, that are raised in the context of all the active states of that particular Case Model.

Note: If the same events, triggered by an active state, are being raised by the activities in that particular active state, such events are not shown in the response.

The Case instance ID can be obtained from:

  • The ID returned in the response of the CreateCase invocation
  • The Workflow.getCaseInstanceId Web API when invoked from a human task of the Case instance

Yes

activityid

The ID of the activity from which the business events can be raised. If this parameter is passed along with the caseinstanceid, the response contains all the events that can be raised from this activity. The activity ID can be obtained from:

No

SOAP Response

<data>
    <GetBusinessEventsResponse
        xmlns="http://schemas.cordys.com/casemanagement/execution/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
        <case:businessevents xmlns:case="http://schemas.cordys.com/casemanagement/1.0">
            <case:event description="Solution.Approved"
                name="Solution.Approved" xmlns=""
                xmlns:case="http://schemas.cordys.com/casemanagement/1.0"
                xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi" xmlns:sm="http://www.w3.org/2005/07/scxml"/>
            <case:event description="Solution.Rejected"
                name="Solution.Rejected" xmlns=""
                xmlns:case="http://schemas.cordys.com/casemanagement/1.0"
                xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi" xmlns:sm="http://www.w3.org/2005/07/scxml"/>
            <case:event description="Solution.Delivered"
                name="Solution.Delivered" xmlns=""
                xmlns:case="http://schemas.cordys.com/casemanagement/1.0"
                xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi" xmlns:sm="http://www.w3.org/2005/07/scxml"/>
        </case:businessevents>
    </GetBusinessEventsResponse>
</data>
Response Parameters

Parameter

Description

event

Each event node represents a business event. The name and description attributes of the event node denotes the name and description of the business event.