Jarvis Pizzeria: First step in Implementing the Order Processing, Interface Definition

In a previous blog post we gave a functional description of the pizza preparation process. For this we used the image below. Till now we only have implemented the bottom part ‘the preparation of a single pizza’.
In this post we will do the next step. The preparation of a complete order, containing potentially multiple pizzas. We will do this in a separate process. So let's start by creating a new process in the preparation application. We gave it the self explaining name OrderPreparationProcess.
Next we created the process flow. We used the baby-step approach to implement to flow, for this reason we start with all components in draft mode.
Make sure to define the subprocess as Multi instance. For now is does not matter yet if it’s sequential or parallel.
First thing to do is feed the flow with some data. We know the data format for a single pizza. An order consist of one or multiple pizzas, so we need a list for that. Besides that we need information about the customer, like name and address. For demo purposes we have limited the amount of data, but in a real life scenario, more data is needed. But we assume you get the point. So let's go.
Start with creating a new Business Object for an order. We called it OrderPreparationBO
Click next to get to the attributes page.
Then, click the Plus sign to add an attribute
After giving a name, select ‘Change Type’ to specify a list of PizzaPreparationsBO’s.
After clicking OK, the attribute is defined as shown below
Click add, to add it to the new Business Object.
We also added the general customer data attributes as shown here.
Now we have defined the input payload format of an order. Next we need to define the output format of the order. Because we don’t want to make it to complicated we have used a String simple type for that, which means that no Business Object is needed.
Now that we have defined the input and output format we can start using them in the process. First we will do the input. Open the properties of Start Order and click the pencil next to Define Interface.
Add the payloadIn argument with type OrderPreparationBO.
That’s all, the input payload is specified.
Do the same for the output.
Now we have defined both the input and output, but of course the data also needs to flow through the process. First lets create a Data Object for that. After selecting the Start Order Message Event open the Data Associations via the button in the top right corner.
In here we see on the left side our order Payload. On the right side we see the Data Objects. In there, add a new Data Object to store the order.
After creating the Data Object, the order can be associated.
Do something similar for the output. We just return the constant value ‘Done’.
Perhaps it is somewhat boring or disappointing but let see the result so far to go. Deploy the application and create some instances with for example SoapUI.
After submitting a soap call with an order containing three pizza the process has the following flow.
And in Tree view mode, we do see that three subprocesses have been executed. So we are on the right track.
What’s next?
In coming posts we will continue to complete the picture. Next part will be the call out to the pizza preparation process from the multi instance subprocess. After that we will extend it with a Decision Model and custom Correlation. And of course besides these topics we will also continue to blog about other PCS features.

Jarvis Pizzeria: Deploying and Reverting to Snapshots

When working on a PCS application, you save and publish your changes often. However, when you publish a certain state of the application, you can decide to create a snapshot of this state of the application.
This can be very helpful if the publish represents a certain version of the application. Later these snapshots can be deployed or reverted to in case you want to roll back to a previous version. It is also possible to see what was in the application at the time of the snapshot creation.
In this blog we will show you how to work with snapshots.
When publishing, in the popup on the right hand side there is a option to ‘Make Snapshot’, when this checkbox is checked you can enter a name for the snapshot, in this case the snapshot will represent Jarvis 1.0!

After the Changes have been published and a snapshot is created we go to the deploy screen by clicking the deploy button.
Now when we select to deploy a new version, we can not only select the last published version, but we are also able to chose the created snapshot Jarvis 1.0.

In the deployment menu we deploy with revision 1.0 as well, to keep things consistent. It might be nice if you can create a snapshot with a certain version which automatically correlates to the revision id of the application, but we will put that on the wishlist for now.

When the deployment is successful it will be shown in the My Server tab as a deployed version.
Now, lets say we implemented some minor changes in the application and we want to publish a version 1.1 of the application. When publishing the last changes, we create another snapshot and call this 1.1.

Within the deployment menu, you can see that we can now select both snapshots of the application to deploy.

And once deployed, we see both versions in the table layout of the deployments.

If we check our work with a postmen Rest call, we see that both the version are currently active and can be called.

Since we did not make the 1.1 version default, the default version of the process is still 1.0. So be aware of all the options you have during deployment. Creating snapshots and different revisions of your application can be very powerful. Let's say we did make the 1.1 default and deleted the 1.0 version. If we find a bug and we can not fix it in time, we can always decide to redeploy the 1.0 snapshot and have the application and our processes once again running in that state. A very powerful tool. We can also revert the whole application to a specific snapshot.

By opening the menu and clicking ‘Snapshots’ or by selecting the blue ‘Snapshots’ button on the right within the Recent Activity window on the homepage we open a popup.

In here we can add more snapshots or delete the ones we have if they become obsolete. This way you do not end up with a lot of old snapshots that you never use anymore. But when selecting a specific version of the snapshot, it will also open this snapshot and revert the application to this specific version.

This screen however is read-only, it is not possible to make edits to a snapshot. However it can still be very nice to see what the state of this application was, you can open all the processes, forms, integrations and see how they were configured at the time of the snapshot.
In case you want to continue working on a previous version, there is a work-around to avoid the read-only application. For this export the snapshot and import it again as a new application, now the new application will be editable again.

Jarvis Pizzeria: Different presentations for the same WebForm

In a previous blog we created a default WebForm for the Pizza Preparation process. In each human interaction of the process we used this default WebForm with the default presentation. In this post we will create a different presentation for each human interaction in the process.
  1. Crust Preparation Will only show the pizza name and size. Both fields are editable.
  2. Filling the Pizza Shows alle data. The pizza name and size are read-only. The ingredients are editable. It’s also possible to add or remove ingredients.
  3. Put in Oven All data is shown read-only.
  4. Get out the Oven The Pizza naam and size are shown read-only.
As a starting point for this blog, we use the end result of the above mentioned blog. We begin by adding presentations to the IngredientsWebForm.
The Main (Default) presentation of the Form.
This is the form we have used for all different presentation. At the form properties level there is an option to specify so called ‘presentations’. The image below shows the 4 newly created ones.
Each presentation is derived from the Main presentation, but this is optional.
After creating the presentations, it is possible the switch between them easily.
Switch to each of them one-by-one and change the component properties to represent the required views given at the top of this post.
For example for the first presentation the table with ingredients is not visible. Select ‘Hide’ for the table component. After doing this for all presentation we have to update the process to use the correct presentation in each task. An example, for the Prepare Pizza Crust, is shown below.

After doing this we are done. We re-deployed the application to test the complete functionality. The following images show all 4 different presentations of the Form.
Crust Preparation - Will only show the pizza name and size. Both fields are editable.
Filling the Pizza - Shows alle data. The pizza name and size are read-only. The ingredients are editable. It’s also possible to add or remove ingredients.
Put in Oven - All data is shown read-only.
Get out the Oven - The Pizza naam and size are shown read-only.
As a conclusion we think that using presentation is a very easy and fast way to show data in different presentation. Presentations gives the GUI developer a major productivity boost.


This spells out the Oracle Developer Community Asia-Pacific ACE Director Tour 2017, thankfully we can put a lot of abbreviations in there, because that is a long name. So I went on the ODC APAC ACED Tour 2017, altho I only did one third of it, I visited both New Zealand and Australia. Being in the great company of Debra Lilley, we travelled to Wellington, Auckland & Sydney, to spread the word about the great SaaS & PaaS products Oracle has to offer and to enlighten these community events with our appearance.

Big thanks to the NZOUG for having us in Wellington & Auckland as well as a thanks to the IAOUG for having us in Sydney and the Ace Program for their support! I did a total of 7 presentation, on the topics of ADF, VBCS & PCS, a good mix for a good spread of content among our attendees.

Instrumenting, Analysing & Tuning an ADF Application, this session was basically all about gaining insight into what is going on in your ADF application. How can you monitor the application and pinpoint your top Performance problems. What are key areas of ADF to have a look at and what are generic tips & tricks to improve the overall performance of your ADF application.

Build your Hybrid application with VBCS, an introduction to VBCS from a developer's point of view. This sessions shows you the insights of VBCS. What is the power and how can you use this Rapid Development Tool to your advantage. Within 45 minutes a application is created for both Web & Mobile use, a data model is created, an overview page that calls an REST api and data is being loaded into the application. After these session, the application is live, up & running in production!

Implement your business process within PCS, a Jarvis Pizzeria use case that takes you through the Process Cloud. Within this session an introductory overview of PCS is given where the attendee is provided with the Jarvis Pizzeria use case and shown how easy it is to create your business process in the Oracle PaaS product PCS. Integrations, Decision models, Human Tasks, the Workspace, tasklist & many more features are discusses and explained within this presentation.

So my trip ends in Sydney after one week, three conferences in three different cities and seven presentations. This leaves Debra behind, since she will continue the tour in Australia. I wish you all the best and thank for the incredible week we spent together! See you soon back in Europe :)