cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Need the previous Lifecycle State

sbecker_67
3-Newcomer

Need the previous Lifecycle State

So my user wants to send an email when the Lifecycle state moves from one particular state to another.  I have been able to use the Lifecycle template to add in a workflow on the state the document is moving into (aka on the Phase Process) but I need it to only send the email if the previous state is one specific state.  I'm not sure how to get that previous lifecycle state.  I'm very new to all this so not even sure it can be done. 

2 REPLIES 2
avillanueva
22-Sapphire II
(To:sbecker_67)

In general, best practice has been to tied a single workflow to the first state and let that workflow change the state of the objects. This is similar to how change objects work. Have you looked at notifications or subscriptions as a way to avoid workflows? 

 

To your specific point, I would look at the LifecycleHelper.service class, specifically the method below:

QueryResult getHistory(LifeCycleManaged object)

 This should tell you what the previous state was before the current one.  But, based on what you described, I would caution if you have the right method to do these notifications. Workflows seem like a bit too much overhead.

The users have looked into those options but considered them not a good fit for this as the amount of subscriptions individuals would have to create would be time consuming.  We do use workflows to change the states, but only upto a point in the process where our customers must be notified.  At that time, it's a manual effort since we are waiting on the customer to acknowledge our efforts to get in touch with them. 

 

I'm sorry do you have an example of this method.  Again I am very new to all this and just would like documentation on this method before attempting.    Thank you.

Announcements


Top Tags