I created a sample custom activity to understand how it works.
it works well if I manually put value in my custom activity input, but if I choose a token from a previous workflow activity,. the toke is not resolve by the value, so the custom activity use the content of the input, mean the variable name. see by picture.
the custom activity do a rename of the starting entry
Yes I have set in the proxy generator the support Tokens
Is there something more to do toget this working, mean get the value of a previous activity token as normal workflow activity do.
here the sample code I used
namespace MonPremierProjet { using Laserfiche.Custom.Activities; using Laserfiche.Workflow.ComponentModel; using Laserfiche.Custom.Activities.Design; using Laserfiche.RepositoryAccess; using LFSO90Lib; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using System.ComponentModel; using System.Workflow.ComponentModel; using System.Drawing; using Laserfiche.Workflow.Activities; public class MonPremierProjetActivity : CustomSingleEntryActivity { private string userInput = ""; public string UserInput { get { return this.userInput; } set { this.userInput = value; } } /// <summary> /// Called when the activity is run by the workflow server. Implement the logic of your activity in this method. /// Access methods for setting tokens, getting token values, and other functions from the base class or the execution /// context parameter. /// </summary> protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { using (ConnectionWrapper wrapper = executionContext.OpenConnectionRA102()) { Session session = (Session)wrapper.Connection; // Note: You must add the Laserfiche.RepositoryAccess reference to this project for this to work. // TODO: Your code here // DocumentInfo DI = Document.GetDocumentInfo(GetEntryInformation(executionContext).Id, session); //or the 2 next lines LaserficheEntryInfo entryInfo = this.GetEntryInformation(executionContext); DocumentInfo DI = Document.GetDocumentInfo(entryInfo.Id, session); DI.RenameTo(this.UserInput); } return base.Execute(executionContext); } } }
Any ideas