Periodic rule evaluation

Mike Pokraka wug at workflowconnections.com
Mon Aug 31 05:35:03 EDT 2009


OK OK, my knuckles are duly rapped for a rushed response! :)

Infinite loop in a fork is not really infinite. I suppose I should add
that good WF design ensures workflows always complete.

Yes your approach is definitely better design but more work. Somehow I
thought it was daily, but re-reading I see "x minutes". Agree, that makes
my suggestion a bad one in this context - especially since it's a custom
table and thus easy to implement a change event.

I've done something similar to what I suggested with agents based on the
org chart. There a daily event + redo rule at 3am was probably less of a
performance hit than checking/redoing rules on every org change.

Cheers,
Mike

On Mon, August 31, 2009 9:36 am, Dart, Jocelyn wrote:
> Err.... "infinite loop"*&)@#$*!!!
>
> No...
> Correct DESIGN is....
> Header level "terminating" event -> Re-evalute rules
> (Important that it's the header level of the Workflow or Subflow that
> actually contains the dialog task to be updated)
>
> Then just raise the event you are using to trigger re-evalute rules
> whenever you want the rules to be reassessed.
>
> I'd suggest you create/use an (IF_WORKFLOW interface supporting) ABAP
> Class event - some sort of generic utility class so that you don't need to
> provide much of a key.
> E.g. you could have an ABAP Class ZCL_WF_RULE instanced on the Rule or
> table id, and raise the event... ZCL_WF_RULE.CHANGED.
>
>
> But I certainly would NOT recommend re-evaluating the rules in background
> every x minutes ... All that does is drain system performance. Much better
> to only trigger the re-evaluate event for relevant workflows/work items
> when an actual change happens.
>
> Of course your approach will work but... You risk degrading system
> performance.
>
> Hope that helps.
>
> Regards,
> Jocelyn
>
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
> Of Mike Pokraka
> Sent: Monday, 31 August 2009 6:23 PM
> To: SAP Workflow Users' Group
> Subject: Re: Periodic rule evaluation
>
> Fork. Infinite loop. Wait step. Raise event. Header level event ->
> Reevaluate rules.
>
> On Mon, August 31, 2009 8:40 am, Shai Eyal wrote:
>> Hi all,
>>
>> In a certain workflow I have the agent are set using custom rule. The
>> rule
>> actually reads from custom table which holds the responsible as user id.
>> Occasionally the user id on this custom table may change. consequently I
>> need to re-evaluate the rule such that outstanding workitems will be
>> updated with the new user id.
>>
>> I'm looking for a standard job to run in background every x minutes and
>> re-evaluate the rule for the outstanding work items.
>> I'm familiar with SWI1_RULE but was not able to schedule to do what I
>> want.
>> My developed solution would be creating report that selects
>> these workitems and run SAP_WAPI_ADM_WORKITEM_REDORULE for each.
>>
>> Does anyone familiar with a standard solution? any other idea?
>>
>> Thanks in advance,
>>  
>> Regards,
>> Shai Eyal
>> SAP Logistics senior consultant
>> SAP Workflow & BPM specialist
>> http://www.linkedin.com/in/shaieyal
>> Mobile: 972-52-5816633
>>
>>
>>       Get your new Email address!
>> Grab the Email name you've always wanted before someone else does!
>> http://mail.promotions.yahoo.com/newdomains/aa/_______________________________________________
>> SAP-WUG mailing list
>> SAP-WUG at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/sap-wug
>>
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>





More information about the SAP-WUG mailing list