Jarvis Pizzeria: Notification Task in PCS

So far we have covered most standard components of the PCS suite. However, we haven’t looked at the “Notification Task” in-depth yet. We have used the on-premises variant at various projects but it was the hassle of setting up the User Messaging Service (UMS) that made you reluctant to use this feature on beforehand. Will the PCS variant be a gamechanger? Let’s find out!
We implemented a basic process with a standard notification task and configured it to send an email to marc.kuijpers@rubix.nl. The implementation details are shown below:




We deployed the process and sent a SOAP message to the corresponding endpoint. Looking at our instance in the workspace we see the following successful instance:
Yaaay! But before we ship this version to a production environment let’s see if we have received an email…..Unfortunately the answer is no :(
Hmm, have we missed a setting? Do we have to configure something? Crawling to the settings in the Business Process Workspace we encountered the infrastructure tab. And it turns out that this is the place where we can configure the notification service.


We filled in the notification e-mail and got a verification e-mail afterwards:
Having activated our e-mail address, PCS sends us a confirmation e-mail:
So let’s run the instance once again. And there it is….a notification e-mail sent by PCS:

We’d have to say that the notification task in PCS is a very easy-to-use feature. You have a provisioned, pre-configured mail server at your disposal. This will save you time and hassle with setting up the UMS settings - which is a tedious and technical chore - in the Oracle EM as you were used to in the on-premises variant.  Developers might choose for a custom built e-mail service to send notifications for business purposes. However, for administrator notifications it can be a very powerful and handy feature that should deserve a consideration in your next PCS implementation!

Jarvis Pizzeria: Workaround for XSD list-element issue in WebForms

In a previous blog we have made notices that it is not possible to create a Webform based on a xsd-type that contains a list elements. In our case a list of pizza ingredients.
In this post we will give an alternative way to create a webform that displays the data, including the list of ingredients. For this we have created a new form IngredientsWebForm.
As we tried before, It does not work to drop the full business object on the canvas. Therefore, we have now made up the form of separate components. 4 input text components, of which 2 are listed in a table component and a number component that is also displayed in the table. This results in the following format.
This is the form we will use for all different presentation (one of our next posts will be about different presentation of one and the same WebForm), but first we will use it in its default. In the top left corner you see that this is the main presentation which is also the default. It is quite logically that it is the default, because it’s the only one :-)
After saving the WebForm we go back to the process to update the various tasks.
For each task we have switched the form reference to the new IngredientsWebForm. The below example shows this for the ‘Prepare Pizza Crust’ task. The example also shows that the Main presentation is selected for the task.


The next thing to do is to fix the data association between the process and the WebForm. For this, we open the Data Associations for the first task. On the input side we make the mapping of the incoming data (via the Business Object) with the fields on the IngredientsWebForm. On the output side we go the opposite way.
But first the input side.
As you can see only the transfer of source to destination is not sufficient. There is a sub-transformation required. Luckily in PCS that is not very difficult. By clicking on the redbox a menu appear with currently one option (transform). Select this.
This brings the following screen.
Click Create to create a new transformation.
Specify the name for the transformation and click Create again.
Create the mapping / transformation.
Save the transformation. This brings us back to the parent transformation. Now the redbox disappeared and the equals sign is replaced by a multi-arrow sign.


For the output side something similar is needed. We suffice with giving a couple of screenshots of one of the implementations.


The table transformation
We have repeated the association between the process and the tasks for all 4 tasks.


Now it’s time to see if this solves the issue. So let's run a test. We deployed the application and executed a SOAP test. As can be seen below, now all Ingredient details are visible.
All 4 HumanTasks in the process use the same WebForm and they all show the same data in the same way. In another post we will describe how to implement different presentations for the same WebForm in a way that every task has it’s own dedicated appearance.


When testing this functionality we ran in a minor issue in the PCS version we used (17.2.3).
On the ‘Track Instance’ page we see the newly started instance.
Select the ‘>’ sign on the right to view the details. The ‘Prepare Pizza Crust’ activity is running.
Launch the Form to see the created WebForm and then ‘APPROVE’ it, or directly select ‘APPROVE’. Both is possible. It doesn't matter which one you choose to get the problem visible.


In the image below you can see that the Graphical view moved on to the next task in the process flow, while the open activities is still on the first task.

A simple refresh is required to get the right task available. It is just a tiny problem but quite annoying in use. So hopefully it will be fixed in the next release.

Jarvis Pizzeria: Human Tasks: Design First WebForms in PCS

To create simple Human Tasks we use web forms in Process Cloud Service (PCS). Within the Delivery Process of the Jarvis Pizzeria, we are going to implement the HT for ‘Try Contacting the Customer’. This human task should become available after we have checked that the Customer is not a member and we do not know his email address.  
Try contacting the non-regular / member from Jarvis Pizzeria, in the swimlane of the CallCenter.


We will take the Design First approach, meaning we will design the form and know what data objects we need afterwards, instead of looking at the data we need for the Human Task first.
This means we can start by creating a new web form.

In the properties window from the task we click the add ‘+’ icon next to the Form.



We want to, but also only can select the ‘New Web Form’ option, the basic form is the old form used in previous versions of PCS. It is still available in the engine for backwards compatibility. Selecting this option will open the ‘Create New Web Form’


After filling in the fields, we click the create button. Because the ‘open immediately’ checkbox is selected, this will bring us to the designer of the web form. We will create the web form by simply dragging and dropping the components from a pallet to the page. This page will show all available data from the order / customer that is available and needed for the task.


For the date & time that the customer is contacted, we want to use the current dateTime as the default value. When selecting a component or after dropping it on the page the properties will be displayed. In the properties we select that this value is a computed value and click the edit button.

This brings up a configuration screen, in here you can select several predefined functions. In our case we select the current date time function for the contactTime field.

Besides computed & default values, it is also possible and quiet easily so to call integrations for data. Within the web form we want to make it possible to select a favourite pizza for the potential customer, so we know what pizzas the customer likes.
After selecting the dropdown box that is on the page with the name ‘favourite pizza’ we scroll to the section where we can select a source in the properties. Here we can choose an already existing connector that we have already defined.
In this case we select the Rest connector FavPizzaRC, after doing that we can see the available resources on this connector. Once we have selected the FavPizzas resource we can select the operation of which we want to expose the data in the dropdown.


After selecting the source, the response options can be selected with help from the properties as well. When selecting the ‘Options List’ it autocompletes the response location. The same goes for the label and value binding, you can select the values if you have correctly configured the steps above.

Now that we have created the default value and the dropdown, lets press the Preview button to find out how the web form looks.
Within PCS, the preview modus of the web form is started and you can select different devices on which you want your form to be shown. In our case we want to have a look how it will be presented on a tabblad.
You can see that the current date time is inserted as defaultValue for contactTime.


Even in preview modus, when selecting the Favourite Pizza dropdown, the Rest service will actually be called and you can see the data that is returned from the service.
This is how easy it is to create a simple human task with the help of the web form technology within PCS. You can do even more advanced stuff within the form, but for most use cases an extra Rest call or populating some default data should be sufficient.
So we choose to cover and focus on these functions within the web form.