SOA Layer
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
<keywords content="keywords"> soa, soa layer, SOA layer, SOA, layer, SOA layer methods, SOA methods, EntityManagerSOA, entitymanagersoa, WorkflowEngineSOA, workflowenginesoa </keywords>
Contents |
Bizagi SOA Layer
Overview
Every process designed in Bizagi is automatically available to be invoked through Web Services by an external application, whose inputs and outputs are XML documents.
Within the integration options in Bizagi, an application or external system has the possibility to create new instances of Bizagi processes, execute a process activity, trigger an event, or consult and update business information for the process, amogst others.
This is possible through Bizagi's SOA Layer which is a layer implemented in Bizagi to provide the processes functionality for the corporate ESB.
From a system’s architecture point of view, Bizagi is compliant with Service Oriented Architectures, in which, applications expose their main functionalities as services to ensure integration between systems running on heterogeneous platforms.
Bizagi data model
To use Bizagi's SOA layer, it is useful to previously view and learn how is your Bizagi project's data model structured.
This way, in any given Bizagi web method, you may send this information consistently within the XML structure.
Through Bizagi's XML schemas options, you may generate and view what is the XSD of any entity or process data model structured (as expected by Bizagi).
In addition to this, keep in mind that to send information to Bizagi via XML, you may use the business keys defintion to update or reference existing records.
SOA Layer's web services
These web services are mainly divided into:
Access to the Bizagi's data model (entity manager) to:
Inquire information saved in Bizagi entities.
Add or modify data into Bizagi entities.
Get information of Bizagi cases.
Access to the process (workflow) engine to:
Create new business cases.
Advance business activities.
Execute Events.
Abort open cases.
Access to the form's metadata to:
Get and use the information about fields of an activity's form.
Get and use the information of fields in a summary or query form.
Access to the Query form reports to:
Get information of all cases from a query form invocation.
Get information of Bizagi entities from a entity query invocation.
Additionally, the services related to the entity manager can be invoked in Expressions, which increase the modeling opportunities; adapting themselves to the specific needs of each project.
Methods to Handle the Data Model
The EntityManagerSOA.asmx Web Service offers the following methods:
getCaseDataUsingSchema: Gets all the case data having, as parameters, the idCase and an XSD in XmlDocument format.
getCaseDataUsingSchemaAsString: Gets all the case data having, as parameters, the idCase and an XSD in string XML format.
getCaseDataUsingSchemaLite: Gets all the case data having, as parameters, the idCase and an XSD in XmlDocument format. The response to this method will not include the content of file attributes.
getCaseDataUsingSchemaLiteAsString: Gets all the case data having, as parameters, the idCase and an XSD in string XML format. The response to this method will not include the content of file attributes.
getCaseDataUsingXPaths: Gets all the case data having, as parameters, an XmlDocument with the desired XPaths in Bizagi.
getCaseDataUsingXPathsAsString: Gets all the case data having, as parameters, a string XML with the desired XPaths in Bizagi.
getEntities: Obtains data from an entity in XmlDocument format.
getEntitiesAsString: Obtains data from an entity in string XML format.
getEntitiesUsingSchema: Obtains data from an entity (or entities), specifying the required data in an XSD, in XmlDocument format.
getEntitiesUsingSchemaAsString: Obtains data from an entity (or entities), specifying the required data in an XSD, in string XML format.
getEntitySchema: Using the entity's name as parameter, extracts its schema in an XmlDocument.
getEntitySchemaStr: Using the entity's name as parameter, extracts its schema in an XML string.
saveEntity: Is used to save and update data in Bizagi using an XmlDocument.
saveEntityAsString: Is used to save and update data in Bizagi using an string XML.
Methods to Handle the Process Engine
The WorkflowEngineSOA.asmx Web service offers the following methods:
abortCases: Cancels one or more cases given their case creation number in an XML in XmlDocument format.
abortCasesAsString: Cancels one or more cases given their case creation number in an XML in string format.
createCases: Creates one or more cases of a Bizagi process. It is possible to create a blank case or also to include information the case needs. This method sends and receives an XmlDocument.
createCasesAsString: Creates one or more cases of a Bizagi process. It is possible to create a blank case or also to include information the case needs. This method sends and receives a string XML.
getActivities: Can be used to get all uncompleted activities (pending, suspended or inactive). It sends and receives an XmlDocument.
getActivitiesAsString: Can be used to get all uncompleted activities (pending, suspended or inactive). It sends and receives a string XML.
getApplications: Gets all available applications in Bizagi; it does not have input parameters.
getCases: Gets information about cases according to some filters included in an XmlDocument, the response is also in this same data type.
getCasesAsString: Gets information about cases according to some filters included in an XML formatted as a string, the response is also in this same data type.
getCategories: Given the name of the application, returns the categories in it. Sends and receives an XML in XmlDocument format.
getCategoriesAsString: Given the name of the application, returns the categories in it. Sends and receives an XML in string format.
getCategoriesFromApplicationName: Given the name of the application, returns the categories in it. This method sends a string and receives an XML in XmlDocument format.
getClosedActivities: Obtains all completed activities. The sent and received XML is in XmlDocument format.
getClosedActivitiesAsString: Obtains all completed activities. The sent and received XML is in string XML format.
getEvents: Returns all available intermediate events of a process, using XMLs in XmlDocument format.
getEventsAsString: Returns all available intermediate events of a process, using XMLs in string format.
getWorkflowClasses: Obtains information about the processes in a category. This method sends and receives an XmlDocument.
getWorkflowClassesAsString: Obtains information about the processes in a category. This method sends and receives a string XML.
getWorkflowClassesFromCategoryName: Given the name of the category, returns the processes in it. This method sends a string and receives an XML in XmlDocument format.
perfomActivity: This method is used to make a manual activity to continue (as if the Next button was clicked). The parameters (input and output) for this method are of type XmlDocument.
perfomActivityAsString: This method is used to make a manual activity to continue (as if the Next button was clicked). The parameters (input and output) for this method are of type string XML.
resumeCases: When a case or cases had been suspended, this method is used to resume them. Sends and receives an XML in XmlDocument format.
resumeCasesAsString: When a case or cases had been suspended, this method is used to resume them. Sends and receives an XML in string format.
saveActivity: This method is used for available manual activities to simulate the clicking of the Save button. Sends and receives an XmlDocument.
saveActivityAsString: This method is used for available manual activities to simulate the clicking of the Save button. Sends and receives a string XML.
setEvent: Use this method to trigger an available intermediate event, using XMLs in XmlDocument format.
setEventAsString: Use this method to trigger an available intermediate event, using XMLs in string format.
suspendCases: Puts a case on hold so the task state (on time, expires today and overdue) is not affected. This method sends and receives an XmlDocument.
suspendCasesAsString: Puts a case on hold so the task state (on time, expires today and overdue) is not affected. This method sends and receives a string XML.
assignActivity: Assigns/reassigns a case's activity to a specific user. This method sends and receives an XmlDocument.
assignActivityAsString: Assigns/reassigns a case's activity to a specific user. This method sends and receives a string XML.
Methods to Handle Forms Metadata
The RenderSOA.asmx Web service offers the following methods:
GetActivityForm: Returns the forms of an active (pending) activity or event in a case.
GetFormById: Gets one particular form giving its identification number.
GetQueryForms: This method is used to get forms of Queries associated to a process.
GetSummaryForms: With this method is possible to obtain a case's Summary Form.
Methods to Execute the query forms
The QuerySOA.asmx Web service offers the following methods:
QueryCases: Performs a search using an application query form to return cases' information. This method sends and receives an XmlDocument.
QueryCasesAsString: Performs a search using an application query form to return cases' information. This method sends and receives a string XML.
QueryEntities: Performs a search using an entity query form to return information at the given entity. This method sends and receives an XmlDocument.
QueryEntitiesAsString: Performs a search using an entity query form to return information at the given entity. This method sends and receives a string XML.
Note: Deprecated methods are features that have been superseded and should be avoided. Only use for backward compatibility. |
Using the web methods of Bizagi SOA Layer
Each web application in Bizagi already contains the published web services as mentioned above.
View further information about this URL location and additional considerations for Bizagi SOA layer's use.
.Net example
In a .NET environment these URLs are used to create Web References to the web services.
Then a code similar to the following can be written to consume either web service (this examples uses the method getEntities):
//An object reference to the web service EntityManagerSOA is created EntityManagerSOA.EntityManagerSOA emSOA = new EntityManagerSOA.EntityManagerSOA(); //An XmlDocument object that will contain the XML is created as input XmlDocument xDoc = new XmlDocument(); xDoc.Load(@"D:\SOA\Inputs\GetEntityRequest.xml"); //The method getEntities of the SOA layer is invoked XmlNode node = emSOA.getEntities(xDoc); //Operations are performed to save the results to disk XmlDocument resp = new XmlDocument(); resp.LoadXml(node.OuterXml); resp.Save(@"D:\SOA\Outputs\GetEntitiesOutput.xml");
Here is the same example but using the method getEntitiesAsString:
//An object reference to the web service EntityManagerSOA is created EntityManagerSOA.EntityManagerSOA emSOA = new EntityManagerSOA.EntityManagerSOA(); //An XmlDocument object that will contain the XML is created as input XmlDocument xDoc = new XmlDocument(); xDoc.Load(@"D:\SOA\Inputs\GetEntityRequest.xml"); //The method getEntitiesAsString of the SOA layer is invoked string resp = emSOA.getEntitiesAsString(xDoc.OuterXml); //Operations are performed to save the results to disk XmlDocument xResp = new XmlDocument(); xResp.LoadXml(resp); xResp.Save(@"D:\SOA\Outputs\GetEntitiesOutput.xml");
Alert: XML has a special set of characters that cannot be used in normal text, like the strings between tags. These characters are:
If is necessary that a CDATA section is used with these characters (see getEntities). For example: Instead of <Company>Johnson & Johnson</Company> use <Company><![CDATA[Johnson & Johnson]]></Company> |
Related Topics
<comments />