Debug an existing CodeWorkflow

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Mar/2016, at 18:52

if you want to debug an existing code workflow, you have to copy the contents of the “<Sequential><![CDATA[“ section of the configuration file (“wf_...” file) into the SequentialWorkflow .__Do() method.

For example, to debug the sample workflow seen above in Activities paragraph, the Program.vb file should be:

  Public Class SequentialWorkflow

    '--------------------- Sequential workflow sub/functions/fields go here

    '--------------------- End of sequential workflows sub/functions/fields

    Private Sub __Do()

      '----------------------- Sequential workflow code goes here

Dim imgId As Integer = 12345

Dim loadImgAct As LoadObjects = New LoadObjects(Context) With {.Name = "load picture", .Description = "loading image..."}

loadImgAct.ObjectIds.Add(imgId)

Dim loadImgRes As LoadObjectsResult = loadImgAct.Do()

Dim objectXml As XDocument = loadImgRes.XmlOut

      '----------------------- End of sequential workflow code

    End Sub

  End Class

 

If you press CTRL+Spacebar Visual Studio Express automatically completes what you are writing.