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

Question

Question

Custom Activity Public Property that accepts a workflow token

asked on December 10, 2015 Show version history

I'd like to write a custom activity that accepts the value for a Workflow token (most likely, a template field reference) in a property.  I've read the white paper for Building Custom Activities in Workflow and had no issues adding a public property that is displayed as an activity property in Workflow designer.  However, the displayed property is a free text field, and does not display the option to bring up the Token dialog.  Is this possible?

Thanks.

0 0

Replies

replied on December 10, 2015

You add the Laserfiche.Custom.Activities.Design.TextboxAttribute to the property to display the token button. The full token dialog is not supported in customer activities.

0 0
replied on December 10, 2015

Sondra - This is a little deeper than what can be covered in a quick post but you can add a reference to the Laserfiche.Workflow.Activities.Custom assembly to your toolbox in Visual Studio.  This makes several native Laserfiche workflow controls available for your use.  Once these workflow controls are available in the Visual Studio toolbox you can drag/drop them onto a user control in your custom activity.  One of the available controls is called 'TextBoxEditControl' which supplies all of the same token functionality available in native Laserfiche activities including the token dialog.

In the code behind the user control you are also going to have to override the OnContextChanged event to make sure the Context property for the TextBoxEditControl is updated as your user control interacts with the other designer controls.

You are welcome to email me at cprimmer@qfiche.com and I can provide some code examples that might help. 

 

0 0
replied on April 9, 2020

Hello Cliff,

     I know that is topic is old, but I am currently working on building some custom controls inside a workflow activity and I have hit a wall. I have almost everything else working but I am stuck trying to get the Token Browser to work inside a custom control class. What I am trying to do is use a textbox to capture a selected token from a token dialog control, then add that value to a listview all inside a custom control. I know that you can have the proxy generator link a browser button on a public string or object inside the activity itself, but how can you get the browser or tokenTextBoxEditControl to work inside a custom control? How can I reference the context or workflow connection? Any help will be very much appreciated.

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

Sign in to reply to this post.