In the first part of this series I described the basics of user interface modelling and interacting with aBPM. This time I’ll show how to integrate aBPM with SAP BPM workflows. This includes:
aBPM does not require different BPM modelling, only a few elements are affected. One is the process start that needs to use an aBPM pre-defined data-type. So let’s have a look on the service-interface:
This is a typical (asynchronous) service interface for a BPM process, the only difference is the usage of the pre-defined ABPMDataType for input parameters. These parameters are filled by the aBPM callback if the process is started from a start user interface like as request form.
This service interface is used by an event trigger and the event trigger as assigned to the start event.
Typically we define a data object (in the example below it’s called “ABPM”) of the same ABPMDataType in the process context and map all parameters to this data object:
The mostly used attribute of “ABPM” is the “ABPMProcessId”. It’s a mandatory input for aBPM user interface integration as well as for interaction between BPM and aBPM.
After defining the BPM process in a way aBPM expects we can now add the necessary code in the aBPM callback. There are 2 places: The startBPMProcessAutomatically method provides the necessary information about the process (that are the vendor, the development component name and the process name itself):
The start is typical triggered by a button and then executed in the handleUIEvent method that we already know from the previous part. Starting a process looks like this:
The Java-code does the following steps:
We are now able to show the user the initial user interface and start the process. The next task is to show the user interface for human activities. As aBPM uses UI5 for user interfaces (Web Dynpro Java is also supported, but its focus is support to support existing processes) we need to create tasks with UI type “Custom Technologies”. The URL as well as the input and output data-type are fixed:
It would be possible to define one aBPM-UI5 Task for all human activities but we recommend to create separate for each human activity because you might to add custom attributes etc. Also the inboxes offer filtering by type that would be useless if only one task-type is used.
After creating the task it can be used to describe a human activity. In order to allow aBPM to know which aBPM process should be shown as well as which attributes should be shown we must set multiple input data attributes via data mapping:
In this case we set:
For each attribute we defined a visibleOnCreate, editableOnCreate and requiredOnCreate property. The value of the property contains the states for which the attribute is visible, editable and required. In our example “Firstname” is visible for the states “START”, “ACC”, “MGR”, editable for “START” and “ACC” and required for “START”. So if we define “MGR” as state for our human activity this field would be visible but read-only and not mandatory!
The states can be defined without any restriction by the developer (best to have some guidelines in place) and can contain placeholder like “*” to define generic states (e.g. “START*” if you have multiple start-states).
After all this, if the user opens the task he can see the following screen when opening the task:
As you have seen in previous section the BPM process contains some basic aBPM data, e.g. the aBPM process Id. What if you need more of the data aBPM stores, e.g. a certain amount to determine if the process needs an additional approval? For this, aBPM provides 2 ways of accessing the data:
After defining the function and a data object of the generated XSD data type, you can map the data with the function fillContext(ABPM/ABPMProcessId).
The last topic I’ll cover in this blog is the interaction between aBPM and BPM beside human activities.
If you need to set aBPM status or interact with aBPM from BPM you can use a predefined web-service that provides multiple methods to call aBPM from outside. With this it’s possible to:
Beside this there some more options that you can trigger also from outside a human activity.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
36 | |
18 | |
13 | |
13 | |
13 | |
10 | |
10 | |
9 | |
8 | |
8 |