How to traverse all liveblocks of workflow diagram?
You must interact through property BlockCount, Blocks, LinkCount and Links (to get blocks and lines available) and check Blocks[c].Anchoreds.DControl and/or Links[c].LinkPoints.Anchor to check what lines are connected to what blocks.
Can you show me, how to get next block of current task?
What (or maybe better, why) you want to do, exactly? Because strictly speaking, there is no "next block of current task". In a task you have several final status and each of them usually flow to a different block. So the next block of a task is only defined after the task is finished and the task status is computed.
I want to read internal status (not completion status) of task after selection correct link and
Sorry, but I didn't understand. What do you mean by internal status, and what you mean by "after selection correct link"?
Here is a snippet of code from the TMS Diagram Studio "getting links" demo, which shows all incoming and ongoing links of a specific block, and what other blocks are connected to it. With this code you can check the next blocks (in diagram), check if they are a task block and then get the status list from it:
I can't run the code;
Those are declared in atDiagram unit.
I've added atDiagram to uses clause but TCustomDiagramBlock and TCustomDiagramLine still are Undeclared.
You can use TCustomWorkflowBlock, yes, since it's the base class for all blocks in a workflow diagram. But TCustomDiagramBlock and TCustomDiagramLine are definitely declared in unit atDiagram, something is wrong...
As I said, there is no such current block for task instance. All you have is current block for the workflow instance itself, which is NextNode (if the task isn't finished, NextNode points to the task block itself). I still don't understand what exactly you want to achieve.
My blocks have few statuses (to note, to edit, to reply etc) (not completion statuses)
Ok but why do you need that? We have never heard of such need, probably because users used a different solution for a similar problem. Why do you need to change status of a task definition when the task instance is not created yet? Are you aware that to change the status of a task instance you just modify the task instance itself?
What "operations"? How are you going to prevent that a user chooses the wrong completion status accidentally?