Time patterns

Time patterns

In the post we will document various patterns we’ve seen from various customers and partners.

Put a deadline on hold in building case permits

We’ve worked with Genoa and Copenhagen Municipalities on building permit process and have found a pattern where a deadline is put on hold while awaiting information from the applicant.

Below we outline a graph where the municipality receives a request. Once received they have 60 days to provide an answers regarding the permit.

However, if information is missing the municipality can ask the applicant (proprietary) for more information.

When the applicant sends information to the municipality the clock is set again using the time expression:

P60D – (clockStart – clockStop)

The two Robot events, clockStart and clockStop, are computational events. Their value contain the time they were executed:

The expression now evaluates to the datetime the activity was executed.

When we simulate the graph we assign Robot to the Lazy user. We start the simulation on November 1st.

When the request is received a deadline is set  60 days in the future.

A week passes and then the municipality find out that the applicant needs to send some additional information. The municipality therefore executes the event asks to the proprietary for other data. A week passes awaiting the applicant (proprietary).

The the applicant (proprietary) sends the data to the municipality:

As the municipality was waiting the applicant (proprietary) for 7 days the new deadline is now the old plus the 7 days, i.e. January 7th, 2020.

The two robotic events is really not needed and clockStop and clockStart events could have been the “asks the proprietary for other data” and “sends to the municipality additional data”.

You can visit the graph here.

Start an activity when a child reaches a certain age

Working with Syddjurs Municipality we’ve seen examples where certain activities must start when a child reaches the age of 16 or 18.

This graph outlines how a delay is set so a robotic event is executed when the child reach the age of 16.

We assume that the system somehow sets the childs birthday when the process start.

We then have a delay calculated as

(Birthday – now) + P16Y

Once the child turns 16 the robot event is executed including the sub-process where the Do something activity is pending.

When you simulate you can enter “Child birthday” to January 1st, 2004. When the engine calculate the above expression it will reach a duration so the delay will be January 1st, 2020. Unfortunately we use C# Timestamp which assumes a year is always 4 years leading to a minor error.

You can visit the graph here.

Set a deadline based on a date

A deadline can be set based on data. You can enter a deadline as a date and get a deadline for that specific date. The deadline expression

(DeadlineDate – now) + P7D

gives you the deadline.

When we simulate we can set the startdate to November 1st, 2019 and enter a deadline of December 23rd. 2019, and then the user executed the Set deadline activity. The resulting deadline is December 30rd, 2019, as it is December 23rd, 2019 plus 7 days.

You can visit the graph here.

 

Set a deadline based on a duration

A deadline can be set based on data. You can enter a deadline as a duration and get a deadline for that specific date. The deadline expression

Duration

gives you the deadline.

When we simulate we can set the startdate to November 1st, 2019 and enter a duration of P7D, i.e. 7 days. When the user executed the Set deadline activity, the resulting deadline is November 8th, 2019.

Sidebar



Bitnami