Hi there,We are in process of migrating some WFTs within WFM. It has some complex code been done within template_script tag. Can anyone provide me some pointers/suggestions as where that code should be written within WFM?Thanks in advance.
I don't think there's a simple single answer. It depends a lot upon what the code within the template_script tag was doing - but essentially it either becomes javascript - often as part of a conditional link between tasks, or as part of a custom instantiation form (i.e. FormAPI), or it becomes Java code as part of a preprocessor.This is one of the reasons why IWOV never provided a tool to automatically convert from WFT to WFM - it requires a personal (and generally knowledgable) touch.I'd suggest taking a step-back from the WFT code itself - and figure out (at a higher level) what you need the workflow to do, and set about implementing it as a WFM from scratch rather than trying to do 1:1 code transition.
Thanks Adam!! I was trying to do it as a part of pre-processor, however could not figure out the real place to implement. In general terms, the much important logic is of branch management. Rest could be handled through task or job params.They are assigning the commands to the task based on the file from which branch it has been submitted. As an example:Branch A - /default/main/store/production/WORKAREABranch B - /default/main/store/maintenance/WORKAREAAny file submitted from any of the two, should call respective command within the workflow. Like file submitted from Branch A should execute the perl file residing at /apps/iw-home/local/bin/production/abc.iplAlso, can a perl file be executed through a pre-processor?Thanks.
if ("$IW_BRANCH".match("\/default\/main\/store\/production") || "$IW_BRANCH".match("\/default\/main\/store\/maintenance")) { "/apps/iw-home/local/bin/production/abc.ipl";}else { "/apps/iw-home/local/bin/some_other_script.ipl";}