TMS scripter studio in Workflow

Hi!

We are using Delphi 10.4 VCL. There is a task for me to make IDE-like block editor using TMS scripter components for script block in Workflow. What is the best way to do it?

  1. Should i replace scripter and engine class in TWorkflowScripter block?
  2. If yes - how to keep backward compatibility so that existing scripts on user machines keep working?
  3. Is there a possibility to add custom forms to script block?
  4. Is there a possibility to wait until user finish working with Scripter project and only then go to next block?

BR

cause now i have only an idea to make completely new block with TatScripter inside and project sources and forms held in some property...as well as to make new block editor form with all TMS scripter IDE components and IDEEngine...Maybe you have some ready to use block editor form with TMS scripter components?

The main question is how to replace ScriptBlock editor form and use there TMS scripter ide components for script block in way that users dont need to change their workflow definitions at all?

Scripting usage is completely contained in a single unit named wsScripter. There you have the full source code and "examples" about how to use a different script engine, how to register a scripter block, and how to create an editor. The only separated thing is the block editor which is the unit fScriptEditor.

To make it compatible with existing workflows, you have to keep the same class name for your block TWorkflowScriptBlock so that when workflow is loaded from database/file, the deserializer can load it.

If you create a similar unit, both units will call RegisterWorkflowScripterBlock in unit initialization, so you just need to put the unit usage order in a way that your unit is initialized after wsScripter and thus overrides the original block registration.