Jarvis Pizzeria: Testing in PCS against the Development or Production environment

Within PCS there are actually two different environments, a development environment and the production environment. Once you have deployed your application it is available in the production environment as a certain version of the application. However, you might want to test your application before you deploy a new version. You can also test your environment against the so called ‘development environment’.

The blue button bar has a Test as well as an Deploy button on the top right.

The Deploy button takes you to the normal deployment screen.

In here you can deploy a certain version of your application, start an instance and see how it behaves. However, this is the production version of you application, calling real integrations.

We have already shown in previous blogs how to start an instance in production.

In this example a REST call, as a result instance #283 has been started.

However, when we press Test instead of Deploy on the top right blue bar, this takes us to a different screen.

We see that we can try our application in the Workspace. When pressing the green button that opens up the following home screen.

You can see that on the top there is a blue bar which says ‘Testing Mode’, you can toggle between the testing (or development environment) and the production environment.

On the center you can start to track instances by clicking the right blue ‘Track Instances’ button.

You can start instances of your application if you have a form start on the left, however, we use a message start. So how do we start an instance in the development mode while we use a message start?

For this we need to set a header in our request, the param ‘pcs_mode’ needs to be set to ‘dev’ in the header to get the information from development instead of production! Here we do a call again to the process-definitions to find out the processDefId for the development instance. For a more detailed explanation of how the REST call works against PCS, see the earlier post Using the REST interface to start a Process.

Once we got the processDefId, you can see it has player~ in front of it in this case, we do a call just like we are used to for the production instances. As we can see from the screenshot below, instance #277 is started in the development environment.

So now that we have started the instance, we will go to the ‘track instances’ page. If we switch testing off on this page, it means that we see production data. As expected, we see our instance #283 that we started earlier.

Also notice how the bar on the top of our screen is now green, instead of the blue we saw earlier.

When we switch testing on, we go into the testing mode and see the data from the development environment.

As you can see here, we see our instance #277 that we created in the development environment!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s