BPT - Skipping activities

BPT - Skipping activities


I have 2 questions about BPT.  I apologize if these are easy questions, but I've researched and can't find the answer:

1) How do I skip an activity that's already completed?  Let's say I have an "Assign Job" activity, then later I have a "Schedule Job" activity.  However, during the "Assign" step, the user also scheduled the job?  In the On Ready action for the "Schedule" activity, I check to see if the schedule has been completed.  If it has, I close the activity, however, the process just hangs, and the browser wheel spins.  When I look in service center, I see the error, but it's simply a timeout error.  If this is not the correct way to do this, what is?

2) Along the same lines, Let's say during the "Schedule" activity, the user decides to instead enter some notes into the Job record.  When saving, I run the CloseActivity action, but check to see if the ScheduledDate field has been set in the On Close action for the activity.  If not, it throws an exception, and the entire record fails to save.  Is there a way to allow the record to save, just throw the exception on the CloseActivity?

Thank you in advance,
Mike Neyman
Hi Mike,

For the skip you could put a conditional activity before the schedule and check there. Only creating the Human Activity for schedule if necessary.
In general rule no Activity actions can be called inside the activity its trying to affect.

For the second issue, it is recommended that you always call CommitTransaction before calling Activity Close. That will keep the save done.
Activity actions run in a separate transaction, so in MS Sql they will be able to read uncommitted information, but they can still deadlock if you update any of the modified data. In Oracle it will not be able to see any uncommitted data, as if it didn't happen.
So CommitTransaction is always recommended before a ActivityClose.

João Rosado

Thank you so much for your response.  I need to think outside the box a little bit more, and the first issue should have been obvious to me.  Thank you for your patience.  I will give the second issue a look as well.