You are viewing limited content. For full access, please sign in.

Question

Question

Can you enable a lock on an entry in workflow?

asked on November 22, 2013

 Is there a way besides containing all the activities you want to perform being inside a script activity, to enable an entry lock on an entry while Workflow is acting on it over the span of a few activities.

 

I know I can use access rights for this but I think this is a bad idea because setting and un-setting access rights may eventually cause unexpected behaviors/issues. I want a more practical solution

2 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on November 22, 2013

No, locks are not meant to work like that. Each activity locks the entry for the duration of its action if needed.

0 0
replied on November 22, 2013

I understand this. I was merely asking if there was a way to have an entire sequence of activities enable a lock on the entry for the duration of all it's activities.

 

The idea being:

  1. "Create Entry" activity
  2. Assign Metadata, apply document relationships
  3. Attaching an electronic file

 

In this situation, if you attach a document as the last task, then the activity might fail if someone does not wait for the entry to be associated with an electronic file. 

 

I have found that I i can create the entry in another location, then move it after everything is done, but for the purposes of the process it would be best if the user sees the file is being prepared and just cannot access it yet. 

1 0

Replies

replied on December 3, 2013

I frequently use a security tag specially created for workflow for this purpose.

 

Just use the Add Tag activity to "lock" and "unlock" the entry.

1 0
replied on December 3, 2013

I believe I mentioned before that I want the user to see that it is there, just not ready to be opened. The lock symbol allows that, but applying a tag may cause them to restart the process that the workflow is still handling as they think it did not work.

0 0
replied on November 22, 2013

This is a feature that has been in the workflow backlog for a while but due to technical constraints of how workflows run is not possible in the product yet.

 

If you require this functionality for simple cases and find creating it in a scratch folder to not be practical,  I'd recommend a script or custom activity.

 

You might be able to permanently lock the created entry with a script, work on it in workflow, and then unlock it, but make sure you have a try catch so you can make sure you are able to unlock it.

0 0
replied on November 22, 2013

That is a bit messy, but What type of lock am i looking to use for this so that activities inside the workflow also can use the entry?

0 0
replied on November 22, 2013

You want to get a persistent lock (basically check out the document). You'll have to be careful with the sequence of activities following the lock to not have any activities that would require actions by other users (like wait conditions) since those would not be allowed on checked out documents.

0 0
replied on November 25, 2013

And that is why I wanted an activity for it. If we had an activity to handle this that was similar to a sequence, then it would warn the creator/publishing that this was not a legal action or would handle the lock being removed for the wait condition

0 0
replied on November 24, 2013 Show version history

Sounds like a job for SDK. When I need to do things like this, I often use the script option. Often the next release gives the functionality I just programmed... I both love and hate the developers at LF ;)

 

Anyways, I believe the general rule in the forums is to only supply code within the SDK forums (licensing required.)  Miruna and Ed, what's the rules in this new forum?

 

-Ben

0 0
replied on November 25, 2013

A lot of the new activities come from user requests. This is no different. There is no "check-out sequence" at this time, but there may be one in the future. We've considered this one, but the UI details make more involved than your usual activities since it would have to validate that you didn't add any wait conditions and whatnot.

 

The rules for code on this forum are the same as the old forums (as a matter of fact, this will replace the old forums soon). With the scripting activities in WF, the SDK forum-only rule for code sorta went out the window.

0 0
replied on November 25, 2013

(sorry for going off topic, Kenneth)

Miruna,

Will assigning certain topics, such as "SDK" automatically limit access to a thread in this new forum?

 

-Ben

 

 

 

0 0
replied on November 25, 2013

it wouldn't limit access, just allow it to be a topic under the question to give the reader a better idea of the contents of the question and to easily find such types of questions based on category.

0 0
replied on November 25, 2013

Ben, there is currently nothing like that on this site. I'd have to double-check if the old forums still do it, but we have no plans to replicate that behavior on Answers.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.