Hi Axon.ivy Team,

In our project, we have several use cases that we would like to use the Delayed Tasks or Expiry Tasks. Depends on the business needs, our delayed or expiration duration may be 30 seconds or less.

However, we discovered that the duration does not work if it is smaller than 60 seconds. I had done our homework a little bit and discovered that the WorkflowJob which was the main module used to resolve expired or delayed tasks is scheduled to run periodically on every 60 seconds. This was done in WorkflowManager.

I assumed this was done by design but it took me by surprise because I could not find anywhere mentioning this limitation. The interval, 60 seconds, is hardcoded and is not configurable like the SystemTask.SearchJob.Interval.

Is there any recommended ways to overcome this limitation?

UPDATE

In our system, we want to communicate to a 3rd party system, namely ABC, via its RESTful API.

  • The process starts when a User triggers a designated action on the UI. We then call the ABC's API to initiate a process on their system.
  • Our system then have to poll ABC's API for result asynchronously.
  • The ABC API requires that we have to poll for result at least after 30 seconds from the time the first request has been sent.
  • We want to have at max 3 attempts to call ABC's API for checking the result. Each time will have an additional delay of 10 seconds.
  • At the same time, the User UI may be also polling for the result. It is not required that they have to keep the UI open.

Having the above requirements, we are using Signal to trigger the polling to ABC's API asynchronously. The Signal process makes uses of SYSTEM TaskElement whose DelayDuration set to 30S. For triggering a retry, the process itself then send a new Signal with an additional delay duration.

What would be your suggestion to implement such a use case then?

Bump this up!

Regard

Jack

asked 25.03.2019 at 06:31

vagabond's gravatar image

vagabond
(suspended)
accept rate: 50%

edited 02.04.2019 at 10:57

Hey @Vagabond, can't you just use an Async REST request and wait for the result? Why do you have to poll anyways? Especially If the result is triggered by the UI: you could fire an async rest request from the UI through javascript... and process the result when its ready.

(28.03.2019 at 08:29) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

You seemed to miss my last point. It is not required that the UI must be kept open. The Axon.ivy must poll for the result. The 3rd party system involves another process on their own. So the API has two parts. One is for triggering the action. The action is carried out on their side. They provide another API to get the status of the process. In case you may ask, no, they don't support web hook for callbacks.

(28.03.2019 at 13:55) vagabond vagabond's gravatar image

To me this sounds like the perfect use-case for a 'Wait' intermediate event:

I know the samples and API is dated: but for instance the ch.ivyteam.ivy.process.intermediateevent.beans.FileIntermediateEventBean contains a sample...

link

answered 04.04.2019 at 02:54

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

edited 04.04.2019 at 02:57

Hi Jack

In workflow processes delay and expiry times are normally weeks, days or hours.

What is your use case that you need to set this to seconds? Are you sure you use the right concept for your use case?

There is currently no workaround for this.

Regards

Reto Weiss, Axon.ivy Support

link

answered 25.03.2019 at 15:46

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

Hi Mr Reto Weiss ♦♦, I have updated my question to include the Use Case. Please have a look.

(28.03.2019 at 03:57) vagabond vagabond's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×68
×11

Asked: 25.03.2019 at 06:31

Seen: 4,660 times

Last updated: 04.04.2019 at 02:57