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

Question

Question

Tokens not found in Workflow Activity

asked on January 2, 2014

I am using Workflow Designer 8.3.1.165 and created a token in a C # Script. I auto-detected all tokens in the script and the token in question appears and is selected. When I publish the Workflow, it clears the validation stage and publishes without error. However, when the Workflow is triggered, I get an error message on a subsequent activity that states the token cannot be found. The token is being referenced by the fully qualified name (activity_token). I turned the 'Global' option on but ended up with the same results.

1 0

Answer

SELECTED ANSWER
replied on January 3, 2014

Rereading your post, I also realized there are some issues that can occur in the upgrade scenario.

 

Take a look at https://answers.laserfiche.com/questions/47671/SetToken-not-working-after-migration-from-WF-8-to-WF-9--arguments-were-parameters-now-literals-needed and it explains some of the new token functions.

 

For these examples, assume I have a token RECORD_STATUS.

 

If you are using global tokens, make sure you are using the function 'SetTokenValue'. A global token is the name of the token only without prepending the activity name:%(RECORD_STATUS).

 

If you use the legacy 'SetToken' method or the SetActivityTokenValue create an activity token or something like %(SDKSCRIPT_RECORD_STATUS).

 

You can use a track token activity to verify what type of token is being set. When the workflow instance runs, it will tell you in the token data tab what the token name and value is.

0 0

Replies

replied on January 2, 2014

This has been an elusive sometimes issue that I think we've fixed in version 9. There are a few workarounds that I know have worked for others.

 

1) Republish the workflow under another name - make sure the workflow name starts with a character between a and z.

2) Uncheck the 'Script Activities' checkbox of 'Run the following activities as tasks' in the Activity Performance tab of the Server Configuration\Advanced Server Options node in the Workflow Admin Console.

3) Select 'Shared' for the 'Script domain model' in the 'Performance (Advanced)' tab of the Security\Scripting node in the Workflow Admin Console.

0 0
replied on January 2, 2014

Running Workflow Administration Console version 8.3.1.158 and my results are below.

 

1. I republished the Workflow under a new name in accordance with the guidelines mentioned. Same error occurred.

 

2. Made the suggested changes in Workflow Admin Console. Same error occurred.

 

3. Made the suggested changes in Workflow Admin Console. Same error occurred.

 

I even received the same error after I did the following:

  • Republished the new Workflow after suggestions 2 and 3
  • Bounced Subscriber Service and Laserfiche Workflow Service

 

Any other suggestions outside of an upgrade to 9.0 (not sure we meet the requirements for 9.0 at this time), would be appreciated.

 

 

0 0
replied on January 3, 2014

Would the workflow be safe to attach to this post?

0 0
replied on January 3, 2014

Ed, you are correct (of course). I went with the global option and everything is resolving. Thank you.

0 0
replied on January 3, 2014

Glad it worked.

0 0
replied on January 3, 2014

That makes two of us and I will catch up with you @ the conference.

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

Sign in to reply to this post.