All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

SOA Layer

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<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:

Image:Bulletrojo.gif Access to the Bizagi's data model (entity manager) to:

          Image:Bulletazul.gif Inquire information saved in Bizagi entities.
          Image:Bulletazul.gif Add or modify data into Bizagi entities.
          Image:Bulletazul.gif Get information of Bizagi cases.

Image:Bulletrojo.gif Access to the process (workflow) engine to:

          Image:Bulletazul.gif Create new business cases.
          Image:Bulletazul.gif Advance business activities.
          Image:Bulletazul.gif Execute Events.
          Image:Bulletazul.gif Abort open cases.

Image:Bulletrojo.gif Access to the form's metadata to:

          Image:Bulletazul.gif Get and use the information about fields of an activity's form.
          Image:Bulletazul.gif Get and use the information of fields in a summary or query form.


Image:Bulletrojo.gif Access to the Query form reports to:

          Image:Bulletazul.gif Get information of all cases from a query form invocation.
          Image:Bulletazul.gif 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:

Image:Bulletazul.gif getCaseDataUsingSchema: Gets all the case data having, as parameters, the idCase and an XSD in XmlDocument format.

Image:Bulletazul.gif getCaseDataUsingSchemaAsString: Gets all the case data having, as parameters, the idCase and an XSD in string XML format.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif getCaseDataUsingXPaths: Gets all the case data having, as parameters, an XmlDocument with the desired XPaths in Bizagi.

Image:Bulletazul.gif getCaseDataUsingXPathsAsString: Gets all the case data having, as parameters, a string XML with the desired XPaths in Bizagi.

Image:Bulletazul.gif getEntities: Obtains data from an entity in XmlDocument format.

Image:Bulletazul.gif getEntitiesAsString: Obtains data from an entity in string XML format.

Image:Bulletazul.gif getEntitiesUsingSchema: Obtains data from an entity (or entities), specifying the required data in an XSD, in XmlDocument format.

Image:Bulletazul.gif getEntitiesUsingSchemaAsString: Obtains data from an entity (or entities), specifying the required data in an XSD, in string XML format.

Image:Bulletazul.gif getEntitySchema: Using the entity's name as parameter, extracts its schema in an XmlDocument.

Image:Bulletazul.gif getEntitySchemaStr: Using the entity's name as parameter, extracts its schema in an XML string.

Image:Bulletazul.gif saveEntity: Is used to save and update data in Bizagi using an XmlDocument.

Image:Bulletazul.gif 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:

Image:Bulletazul.gif abortCases: Cancels one or more cases given their case creation number in an XML in XmlDocument format.

Image:Bulletazul.gif abortCasesAsString: Cancels one or more cases given their case creation number in an XML in string format.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif getActivities: Can be used to get all uncompleted activities (pending, suspended or inactive). It sends and receives an XmlDocument.

Image:Bulletazul.gif getActivitiesAsString: Can be used to get all uncompleted activities (pending, suspended or inactive). It sends and receives a string XML.

Image:Bulletazul.gif getApplications: Gets all available applications in Bizagi; it does not have input parameters.

Image:Bulletazul.gif getCases: Gets information about cases according to some filters included in an XmlDocument, the response is also in this same data type.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif getCategories: Given the name of the application, returns the categories in it. Sends and receives an XML in XmlDocument format.

Image:Bulletazul.gif getCategoriesAsString: Given the name of the application, returns the categories in it. Sends and receives an XML in string format.

Image:Bulletazul.gif getCategoriesFromApplicationName: Given the name of the application, returns the categories in it. This method sends a string and receives an XML in XmlDocument format.

Image:Bulletazul.gif getClosedActivities: Obtains all completed activities. The sent and received XML is in XmlDocument format.

Image:Bulletazul.gif getClosedActivitiesAsString: Obtains all completed activities. The sent and received XML is in string XML format.

Image:Bulletazul.gif getEvents: Returns all available intermediate events of a process, using XMLs in XmlDocument format.

Image:Bulletazul.gif getEventsAsString: Returns all available intermediate events of a process, using XMLs in string format.

Image:Bulletazul.gif getWorkflowClasses: Obtains information about the processes in a category. This method sends and receives an XmlDocument.

Image:Bulletazul.gif getWorkflowClassesAsString: Obtains information about the processes in a category. This method sends and receives a string XML.

Image:Bulletazul.gif getWorkflowClassesFromCategoryName: Given the name of the category, returns the processes in it. This method sends a string and receives an XML in XmlDocument format.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif resumeCases: When a case or cases had been suspended, this method is used to resume them. Sends and receives an XML in XmlDocument format.

Image:Bulletazul.gif resumeCasesAsString: When a case or cases had been suspended, this method is used to resume them. Sends and receives an XML in string format.

Image:Bulletazul.gif saveActivity: This method is used for available manual activities to simulate the clicking of the Save button. Sends and receives an XmlDocument.

Image:Bulletazul.gif saveActivityAsString: This method is used for available manual activities to simulate the clicking of the Save button. Sends and receives a string XML.

Image:Bulletazul.gif setEvent: Use this method to trigger an available intermediate event, using XMLs in XmlDocument format.

Image:Bulletazul.gif setEventAsString: Use this method to trigger an available intermediate event, using XMLs in string format.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif 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.

Image:Bulletazul.gif assignActivity: Assigns/reassigns a case's activity to a specific user. This method sends and receives an XmlDocument.

Image:Bulletazul.gif 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:

Image:Bulletazul.gif GetActivityForm: Returns the forms of an active (pending) activity or event in a case.

Image:Bulletazul.gif GetFormById: Gets one particular form giving its identification number.

Image:Bulletazul.gif GetQueryForms: This method is used to get forms of Queries associated to a process.

Image:Bulletazul.gif 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:

Image:Bulletazul.gif QueryCases: Performs a search using an application query form to return cases' information. This method sends and receives an XmlDocument.

Image:Bulletazul.gif QueryCasesAsString: Performs a search using an application query form to return cases' information. This method sends and receives a string XML.

Image:Bulletazul.gif QueryEntities: Performs a search using an entity query form to return information at the given entity. This method sends and receives an XmlDocument.

Image:Bulletazul.gif 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:

  1. Double quotation mark (")
  2. Ampersand (&)
  3. Apostrophe (')
  4. Less-than sign (<)
  5. Greater-than sign (>)

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 />