Jarvis Pizzeria: Setting up the Dynamic Process

In this blog we will implement a first version of the preparation of an order using a dynamic process. We continue where blog one stopped. The imported order process is extended with an example dynamic process.

We open the DynamicOrderProcess, which should still contains the example. We will build this so that it contains the Pizza ordering process. However, when opening the Process, we can see that the example is no longer there. Apparently, the example is not saved, maybe because we did not make any changes to it? Let's create the example again, and then change it immediately.

The first step we take to make it our own is to define the stages. Rename the 'First Stage' in 'Ordering'. The 'Second Stage' in 'Preparation' and add another third stage 'Delivery'.
For changing the name of a stage, select the pencil in the title bar to get to to properties.
In there change the name. Use the add icon just above the pencil to add the third stage.

Now let's save our changes and see what happens to this modified 'example’. We close the Dynamic process, and then open it again.
However, our changes have disappeared as well. The whole example is gone once again. How is that possible? Is something thoroughly wrong with the application or is an example application just an example, and can it not be saved? Anyway, it is good to realize the example application is there as an example and not like a QuickStart application.

So let's restart again. Now we will not create an example, but just add the different stages.
After doing this, yet again, let’s put it to the test. We save our application, close it and reopen it. Yeah! Alright! Now the changes persists, so it does have something to do with the example mode.

From here we will continue to build our dynamic process. First we will show the composition of the Dynamic Process and then we will explain how we come to this.

For the order phase we have chosen to only use a humantask. This is used to place an order. This is a mandatory activity in this phase. And it is also manually activated. When you select the activity and then click pencil this will open the properties of the activity.

Here we make the activity mandatory and say that it must be activated manually. We only want one order to create a dynamic process instance, so this activity is not repeatable. 

In the preparation phase we have three activities. The structured Pizza preparation process, which is repeatable for every pizza of the order. A milestone that is set at the moment that all the pizzas of an order are ready. And finally the human task that is started to prepare the order for delivery. The table below shows the settings of these activities.

Manually Activated
Prepare Pizza
Compose Order

Next we get into the delivery phase. In there we have the delivery process and the delivered milestone. The delivered milestone is set as soon as the order has been delivered and paid as well. The payment can take place during the entire process, from the beginning of the order to the final delivery. As soon as the payment has been made, the milestone paid is set.

Manually Activated
The first rough design

So that is how you set up a dynamic process. It takes a couple of stages that host the activities, tasks and milestones and you can configure the details. There is still a lot more to Dynamic Processes then the simplistic overview we gave in this blog post, but we will get there step-by-step. How does these dynamic processes modeling compare to the on-premises ACM variant? In terms of features we covered in this blog post, there is nothing much new under the sun. But in terms of developing environment it is much more smoother. The on-premises case definition was unclear. It was hard to get a real grasp of your dynamic process without diving into both the case definition and the corresponding business rules. PCS on the other hand, gives you a comprehensive outline of your case definition. It shows you the stages, the activities, the milestones and the corresponding features (i.e. activities are required, repeatable, etc.) all in one overview! Although we haven’t covered the rules yet, we can easily say that setting up a new dynamic process is a piece of cake now! In the coming blogs we will discuss features such as calling the process & human task, the run time representation of a dynamic process, the activation or disabling of activities, different ways to start a dynamic process and many more.

VBCS: Create your Mobile Application

Now that we have set up a first stable version of our application within VBCS, it is time to explore the mobile capabilities of VBCS. It leverage the capabilities of MAX (Mobile Accelerator) and is build in to the VBCS platform.
This blog post will take you through the basics of the functionality.

We start by sharing our application resources of the build VBCS web application. In the security properties we toggle to enable Resource sharing.

Once this is done, we go to the home screen and create a new mobile application.

This action will open MAX within VBCS. In the create application wizard we choose the
Screen with Top Tabs as basic template.

In the next step we can give the application a name (Screen Title) and already configure how many tabs we want the application to have and specify the names. Lets start with the Tracks and Speaker page from the earlier created application.

In the next step of the wizard, for the content we select ‘List Content’ as screen.

We have completed the wizard, so lets click the green ‘Create’ button to create the mobile app.

On the next page, we want to add data to the generated app and page, so we choose the ‘Add Data’ option.

For this we need to select a layout again, so to display the data it feels ok to add 4 fields per row on the page, we select the top right option and press Next.

Now that have selected how to display the data, we need to select a data source. Remember that we turned on the share application resources as first step of the blog? We are now going to add the application here to use the resource. Select the ‘Add Application’ option.

In the next screen we select the app we want to use:

And after that we can select business objects from that application.

After Drag & Drop’ing all the fields we want to show. You can see the data in action, by pressing the ‘Live Data Preview’:

With this we also completed the wizard to add the data to the screen and we can press finish to exit the wizard.

The phone app now looks like above, but we want to add a detail screen to this page. So as you might expect we need to select ‘Add a Detail Screen’.

In the wizard/train I select a simple screen, enter ‘Track Details’ as title and select form content.
After this we go to the detail screen and again select the ‘Add Data’ option.

Now we go through the wizard again, to drag & drop fields on the form component, but as you can see we drop more components on this form then on the previous layout. In the parent page we had a form that displayed 4 fields, here we are going to show more details:

After setting up these two pages, we still want to change the icon for our app. So go to the Application Settings. There we find the application icon and we change it to our desired logo.

Now we can run our app in the test mode. We can select the layout and the phone.

However, you can also ‘Test on Phone’, by pressing this button, a QR code is generated.

This QR code enables you to test your application on your phone. You need the MAX app for this. However, this is a clever trick by Oracle. You download the special MAX app and then add your application by scanning this code.
This way you can actually test the app on your phone and see the native behaviour, but you do not need to go through the trouble of getting your app accepted on either the play store or the app store.
A great way for easy testing on your phone!

Jarvis Pizzeria: Getting started with Dynamic Processes

Getting started with the new integration cloud, the cloud that brings ICS, VBCS and PCS together. This also includes the introduction of dynamic processes, Oracle's new approach for adaptive case management. This introductory blog consists mainly of an overview of the different parts of dynamic processes. In addition, some differences between PCS and the Integration Cloud are discussed.

First step: import the Jarvis Pizza Preparation application. The location of this menu option is changed but the functionality is not. So we do this in two quick steps.

Next, select the exp file, and we’re done.

Also the ‘Deployment’ of the application has change a bit. Instead of a 'Deploy' button we now have an 'Activate' button.

The activation steps are all the same as it was for deployment. Now we are going to extend the application with a Dynamic Process. Select Create. This will display the create menu, containing two options, including the ‘New Dynamic Process’ options. Select this option.

Specify a name for it

Now we come into a complete new part of the Integration Cloud to create the ‘Dynamic Process’

Since the functionality is new to us, lets first find out how it works by creating a sample. Select ‘Create sample’. A screen appears to specify stages, activities and milestones.

The example already contains two stages, a human activity and a milestone. The sample applications automatically start a tour that gives several hints to create your one Dynamic Process. The first one is shown in the above image. The other 13 tour steps are shown below.

Now that we have completed the tour and we have gained insight into the intentions of all the different components, we can implement our Jarvis Pizzeria variant of a Dynamic Process. We will do this in our next post.

Jarvis Pizzeria in Case Management Style

As our business grows and our digitalisation kicks in, it is time to reevaluate our process setup. We are happy with our processes in Process Cloud, they are easy to set up and we can manage our process from Ordering a Pizza al the way through to delivery. 
However as with any BPMN, this a very structured process. Sometimes we require a bit more flexibility. 

We had a good chat with our friends from Oracle and we were very pleased to hear that our wish to become more flexible aligned with their plans for PCS. We were thinking towards a Case Management solution for our pizzas and got a very satisfying answer. 

In October 2017, Oracle released the Oracle Integration Cloud (OIC), not to be confused with the Integration Cloud Service (ICS). The Integration Cloud brings together several Low Code products. VBCS, Visual Builder Cloud Service, for developing user interfaces, ICS, Integration Cloud Service, for creating your integrations in the Oracle Cloud. Stream Analytics, for smart analytics on your integrations & processes. And last, but certainly not least PCS, Process Cloud Service, that in their new release includes Dynamic Processes. These Dynamic Processes have a lot of Case Management features and have a notation that feels a lot and reminds us of CMMN. 

For our Pizzeria business, this means a little redesign of our Structured Process into a CMMN like notation, that is more dynamic. This is helpful since it will make it easier for us to implement features such as ‘Requesting the Order Status’, ‘Changing the Order, ‘Support Payment later in the Order process’ and more. 

In the blog posts to come, we will transform our structured pizzeria in a more dynamic design. Along the way we will highlight the core features of the Dynamic Process structure within PCS and help you get acquainted with them.

Jarvis Pizzeria: Third step in Implementing the Order Processing, Correlation

In our blog entries the First Step and the Second Step there was described how multiple pizza’s could be prepared using a multi-instance subprocess. Although we saw this working correctly, the subprocess was configured to prepare pizzas sequentially, see the screenshot below:

However, due to the success of the Jarvis Pizzeria, new equipment was purchased. Two brand new ovens were installed, enabling the Jarvis enterprise to prepare three pizza’s simultaneously...awesome!

To make optimal use of our equipment we should configure the process to prepare pizzas in parallel, see the screenshot below:

Those of you who have worked with multiple asynchronous calls from the same process (or even BPEL, back in the days) should remember the need for correlating the invocation with the corresponding callback.

Lets first try this with setting up message based correlation. I.e. from the calling process we initiate a correlation with a unique key which is send to the called process. The called process returns this unique key and hence the calling process knows on which callback it has to wait.

In the properties of the “Start of Preparation” activity we have the option to initialize the correlation:

Via the data association we make sure that the key contains a unique value, for now we have used the pizza name(which we make sure is unique when sending the soap request)

Obviously, this key is sent back, untouched, from the Pizza Preparation process. It is this same key that we use to correlate the callback with, as seen in the properties window below:

When testing this process we try to prepare two pizzas: salami and pepperoni, which would result in two instances of our subprocess. Looking at the screenshot below, we see indeed that two instances are spawned at the same time, but also that the second one ran into an error:

What happened?

Hmm, a correlation violation. Were the correlation keys not unique? Yes they were! But we did initialize the same correlation key more than once! So what actually happens when setting up a correlation - assuming correlation sets work the same as in BPM suite? When the runtime engine comes across a correlation it will create a MD5 hash from the values in the correlation keys and is this hash value that is used to correlate the message on the callback operation.

So the correlation violation was caused by initializing the same correlation key twice. How was this solved back in the days when using BPM suite? The trick we could use in BPM suite was to use so-called scoped conversations. Instead of using the default conversation, the send and receive task in an embedded subprocess each uses this advanced conversation.

So where does this leaves us? In PCS we haven’t seen the option to use Advanced Conversations (yet), thus you should find a way to work around this if you want to use send and receive tasks in a multi-instance parallel subprocess. Or you should stick with the sequential option and don’t use correlation.

The addition of dynamic processes might imply additional features or improvements in processes. Meaning, that in the near future this correlation issue might be solved and advanced conversations - or something similar - are added. We will keep you up to date, stay tuned!