Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

task table without data generated

 Post Reply Post Reply
Author
Garcia Jose View Drop Down
New Member
New Member
Avatar

Joined: 21 Sep 2012
Posts: 1
Post Options Post Options   Quote Garcia Jose Quote  Post ReplyReply Direct Link To This Post Topic: task table without data generated
    Posted: 08 Jun 2013 at 12:25pm
I"m writing code using the example of section 7.3 of the manual and I do not get the desired results, by executing the following line "WorkFlow.WorkflowEngine.RunWorkflow (wfi)" on the table "WSTASKINSTANCE" does not generate any information and Table "WSWORKFLOWINSTANCE "is generated correctly.

allowed me to make some changes in the product demo to see if it was my application, and got the same results from my application.

the following code are the changes made to the product demo.


TfmMain.Button1Click procedure (Sender: TObject); var
   WFD: TWorkFlowDefinition;
   wfi: TWorkFlowInstance;
   i: Integer;

begin
   WFD: = WorkflowStudio1.WorkFlowManager.FindWorkflowDefinitionByName ("Deployment workflow");
   if not Assigned (WFD) then
    exit;

   wfi: = WorkflowStudio1.WorkflowManager.CreateWorkflowInstance (WFD);
   if not assigned (wfi) then
    exit;

   WorkFlowStudio1.WorkflowEngine.RunWorkflow (wfi);

   wfd.Free;
   wfi.Free;

HOPEFULLY COULD HELP ME FIND THE ERROR

thanks

Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2434
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jun 2013 at 6:23pm

Hello Jose,

 

Do not destroy workflow instance after calling RunWorkflow.

RunWorkflow runs in a synchronized thread and thus returns immediately, so you are destroying workflow instance before it gets executed. You don't need to do that, RunWorkflow will destroy the instance when it's finished.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down