cancel
Showing results for 
Search instead for 
Did you mean: 

XI3.0/SP19: Deadline Branch - Set time period dynamically

Former Member
0 Kudos

Hi All,

We need to receive the deadline period from an external system

Is it possible to set the time period from an external value?

Thanks,

Ofer

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

you can do it with reference date/time = Expression

then in time and date you can choose a value from your message

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks!

Michal- I didn't see the "Expression" option in the Deadline Branch Time/Date property, so it obviously solved my problem.

Henrique- Thanks for your answer- it was very helpful

Cheers,

Ofer

henrique_pinto
Active Contributor
0 Kudos

We had a similar request in a project of ours, and managed to make it work with the following workaround.

Use a Fork Step with 2 branchs and in "necessary finished branches" option, set it to 1.

In 1 branch, use the steps you normally would use in the block w/ deadline main branch.

In the other branch, use a transformation step with a particular mapping.

This mapping should be from the message you receive in "start process" receive step to any other target (you could create a dummy target message type or use the same message type of source message). In the message mapping, supposing you use target message = source message, just map all fields into the respective targets. In particular, in the field with the value you want to set to the deadline, use a UDF between the source and the target. Supposing the waiting interval is in seconds, use the UDF as:

...
int delay = Integer.parseInt(a);
try {
  Thread.sleep(delay*1000);
} catch (InterruptedException e) {
  throw new RuntimeException("Error in waiting function.");
}
...

This way you can have any time interval you want (including intervals shorter than 1 minute).

Regards,

Henrique.

Former Member
0 Kudos

Hi Jai!

You are talking about the SAP pattern <b>BpmPatternCollectTime</b> where the deadline monitoring is hard-coded to be 24 hours:

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm">From SAP help</a>

Again, do you know how to set the time period to anything other than a fixed value?

Cheers,

Ofer

Former Member
0 Kudos

Ofer,

Refer this page: http://help.sap.com/saphelp_nw2004s/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm

You have 3 options while using dead line monitoring.

From SAP help

<i>1. Pay load dependent :The loop finishes when the number of messages received matches the number specified in the payload of the messages

2. Time-Dependent : The loop finishes at a specified point in time.

3. Message-Dependent : The loop finishes when a specific message is received.</i>

Regards,

Jai Shankar