Dynamic 'on activation' for a workstep tied to a dat

Posted by nking on 02-Dec-2011 11:14

Try this again with a proper title...

A customer is attempting to specify a date/time when a workstep should become activated.  They have attempted to use a DATE dataslot with the "Activate on" functionality, however, if the date dataslot changes value (after the workstep is in activation_wait), that change does not reflect in the workstep "activate on" time (it's not dynamic, the value is only picked up when the workstep is first encountered).

I understand that the above is the designed behavior, however, the customer requires that any subsequent changes to the dataslot value be reflected in the "Activate on" time in the workstep.  I know that there is a BizLogic API call that can modify the activation time of the workstep, however, triggering that API to be called for *any* dataslot value change seems to be a challenge.  I expect we can do this in BizPulse, however, do we have a "best practice" example rule that will trigger on ANY value change of a specific dataslot?  The dataslot value may change via S_UPDATED, but it appears that the value can change in many other types of Events as well...

Any assistance anyone can provide would be helpful.

All Replies

Posted by nking on 16-Dec-2011 14:24

In case someone else need this... I wrote a rule to accomplish this:

application testdynamicactivation
rule module testdynamicactivation_rules

group testdynamicactivation
    rule testdynamicactivation
    activated by EVT_1 of BizLogic::PI_DATASLOTSSET{PROCESSTEMPLATENAME : "testdynamicactivation"}
        val blServer = getBLServer();
        val session = getBLSession();
        val pi = blServer.getProcessInstance(session, EVT_1.PROCESSINSTANCENAME);
        val wsi = pi.getWorkStepInstance("Activity");
        val dateds = cast(~com.savvion.sbm.bizlogic.server.svo.DateTime) pi.getDataSlotValue("ActivationDateTime");
        val dateLong= dateds.getTime();
        if (dateLong>~java.lang.System::currentTimeMillis()){

Note that it only captures "PI_DATASLOTSET" which is fine assuming the dataslot updates only come from the "dataslot view" in the portal.  If the dataslot updates come from an API call or through a dataslot change in a workstep, the problem becomes increasingly complex.

This thread is closed