cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid activity step to skip from log in SWI1 or How to current timestamp in SAP Workflow?

SBLSVRamana
Explorer
0 Kudos
486

Hi,

I need to send mails with template for every 3 hours after first time mail sent.

I create steps lie below to acheive that.

First I created 3 variables in workflow container.

TimestampToSentMail ( Initially blank ) add 3 hours to current timestamp within loop

CurrentTimestamp ( Initaily blank ) always holds current timestamp at runtime within loop

FlagtoSendMail (initially Y to sent mail for the first time and after first loop changed to N) and will be updated with Y once TimestampToSentMail and CurrentTimestamp are equal.

1. Activity Step withall the above 3 parameters as import and export to the task.

with in the BOR method, I'm checking both TimestampToSentMail and CurrentTimestamp wheresas for the firsttime both will be blank and FlagtoSendMail = Y so the step will be pass.

2. Condition step

Here i'm checking FlagtoSendMail = Y then step 3 will execute to send mail else loop will repeat and goes to step 1.

3. Activity step to sent mail if the above condition matches.

here adding 3 hours to TimestampToSentMail and FlagtoSendMail = N so that until 3 hours this step wont be executed.

Now here my problem is Step1 (Activity step) is running for every second and traced into workflow log in SWI1 and when the count of this step reached to 1000 then workflow automatically going into error state.

Here either i can keep condition in condition tab to create workitem when TimestampToSentMail = CurrentTimestamp to avoid unnecessary creation of log and workitem at runtime. but to do this there is no system field or workflow object field with current timestamp.


Can anyone please guide me how to achieve this functionality or any other approach?

Thanks in advance.

Regards,

Ramana.

View Entire Topic
former_member186746
Active Contributor

hi,

you're thinking too sequentially.

so the problem is until activity A is completed send an email every 3 hours to X.

You can achieve this by triggering an extra event when activity A is started. this event has a simple workflow as receiver which consists of a 1:2 fork, in one branch a dummy step with a requested start of A time + 3 hours, followed by the mail step, followed by a create event for this workflow with the new base line time. In the other branc a wait for a terminating event which is triggered in your first workflow following activity A.

Now back to the validity of the business requirement. If I were you I would challenge it with the business, any escalation consisting of just send email every X hours is one that is jeapordizing to the business process. It makes way more sense to incorporate an aditional escalation process, e.g. after 1 day of sending reminders send the task to the manager of the agent or to a specific department.

Kind regards, Rob Dielemans