Can you brief your requirement, as of the new modeller you cannot access this element, but brief your requirement with the new modeller to help you.Pradeep
Can you brief your requirement, as of the new modeller you cannot access this element, but brief your requirement with the new modeller to help you.Am I the only one who has absolutely no clue what this means? I'd like to be able to help, but I'm totally lost.J.Anderson
Can you brief your requirement, as of the new modeller you cannot access this element, but brief your requirement with the new modeller to help you.
I think Ghoti has summarized it nicely.I need to check if any of the user selected files are already attached to an existing active job(s) before letting the user initiate a new job.New workflow modeller provides macro variables where file path is available. Unfortunately these variables are not available on the instantiaion screen [Ref: page 60 of wfm guide].WFM lets us specify if file comments are required in the workflow properties section. I think behind the scenes java modules are translating the property to display the list of files and I still could not figure a way to obtain the list of files in the instantiation screen.
Has anyone found a way to access the file list from the instantiation screen yet using WFM? [...]As Anisha said, "In the old workflow files (.wft), one could get the list of files attached to the job by accessing __ELEM__('iw_file')."Surely there must be an equivalent - Why would IW remove functionality that has proven useful in the past? [...]
Has anyone found a way to access the file list from the instantiation screen yet using WFM? The reason I ask this question is because I have a workflow that is used to edit DCRs. The problem is that if there are no DCRs selected, ALL modified DCRs in the current directory and subdirectories are attached to the workflow. I need to know if any DCRs have been selected before the instantiation screen comes up.
I think you're making a somewhat erroneous assumption - it's not necessarily that IWOV removed functionality, but more that they might not have ensured that all useful functionality was re-implemented when they brought in the WFM (which I believe was, at least in part, OEM'd).
Not to mince words but when you say "re-implement" does that not mean that something has to be implemented that used to be there? To me that would indicate that functionality was removed when they created WFM (though still intact for the older *.wft format). I'm not saying they removed it permanently but they did not tell developers how they exposed it or how to access it (from what I have read, it is not formally documented)
That small point aside I believe my co-worker and I have found a possible solution to this issue. We viewed the source code on the "select workflow" screen once you select "Action -> New Job" to see if there was any information in there that we could use.In the javascript for this screen, there is a hidden input field that is created if a user selects files or folders. In this example, I selected a folder called "internet" and then selected "new job"In the source code, the following hidden input and value is created.[html][/html]If the user did not select any files or folder, this input field will not appear in the source.How can I put this to use you ask? Simple. In your custom_instantiation.cfg file, you insert some javascript into a "onforminit" event that allows you to loop through the variables on the parent document (which happens to be the workflow selection screen). If you find an input type that has a name == to "iw_model_files" then you know that the user selected specific files. If you do not find that value, you know they have not selected any files. Yes it is a bit of a workaround and probably not fully supported because it could change for SP1 BUT it is all that we have to go on at the moment for WFM 1.0.0.0 - hope this helps. Here is some rough javascript code for the custom_instantiation.cfg screen that allows you to check for the hidden input field. (you can change the 15 number to find the max # of elements on the page instead - it's been a busy morning here so I haven't had too much time to clean things up)[html]for(i=0; i<=15; i++){if((parent.document.getElementsByTagName('input').name == "iw_model_files") && (parent.document.getElementsByTagName('input').value != "null")){} }[/html]I know that some of you will say that this is not supported or the proper way of doing it but if you can find a better way using WFM 1.0.0.0 , I'm more than happy to listen.Thanks,/FF
A comment or two - but mostly fixing formatting so others can see what was written ... "re-implement" as in they had certain functionality implemented within the "old" UI that appears to need to be implemented in the "new" UI - the two UIs are vastly different so it's a case of re-implementing, not restoring - which would imply that it was there in the new UI and removed.Good detective work - a shame you (or any of us) had to go through it.
sorry, been a while since I visited this post. I should have posted the feedback I got from Iwov support on this; It's inline with what FurnaceFace suggested.*****************************response from Iwov support:According to engineering, we add a few request parameters:iw_model_files -> will contain comma separated area relative pathsiw_model_branch -> vpath of the branch from where the workflow isinstantiated iw_model_areavpath -> vpath of the workarea from where theworkflow is instantiatedNOTE: These parameters will be removed from SP1 onwards, as aneasier/cleaner way will be provided.*************************************
Has the "easier/cleaner" way been revealed?
The following code gives the attached files. It can be used in custom_instantiation.cfg elementlist=parent.document.getElementsByTagName('input'); for(i=0; i<elementlist.length; i++){ if((elementlist.name == "vpath") && (elementlist.value != "null")){ alert(elementlist.value); } } }
elementlist=parent.document.getElementsByTagName('input'); for(i=0; i<elementlist.length; i++){ if((elementlist.name == "vpath") && (elementlist.value != "null")){ alert(elementlist.value); } } }
But now... how to get it to a perl postProcess script!Dave.
does anybody know how to acheive that without having to write proprocess java class?since we can get the list of attached files in the form, is there away to modify the list in the form? like either add another file or remove some?
Sorry, i was in the middle of working on things and i didnt pay attention to my writing. but this is the story:
i have very simple workflow (wft1) : the user selects files from a specific folder in workarea -> new job -> selects wft1 from available workflows-> an external task gets invoked which runs a perl script (the perl scripts uses task->getfiles() to get the attached files then it does very complicated things with them).
i have the wft version and i wanted to convert it to wfm with minimum work, which turned out to be simple task. the exact same process just built with workflow modeler using the same perl script.
then i wanted to enhance it so the user won't have to browse to the folder to select the files. i changed it to where the user just clicks on new job -> selects wfm1 -> which brings up the custom instantiation form with available files to attach. since i am used to making things with wft, perl, and i wasnt very familiar with how wfm works, i didnt know how to get the selected files to my external task/perl script. that's where i needed to find a way to attach the selected files to the workflow and then my perl script will just pull them with task->getfiles() (and that s how i got involved in this thread). but attaching/adding the files to the workflow using postprocess cmd was going to require some java coding / maketool /fix the errors / maketool again... which i dont have time for. but as you see, i got to pass the selected files ( what was supposed to be "attached files") as an argument in the external command (configurable variable). then i changed the perl script from using task->getfiles() to take that argument and extract the files to be processed.
i know it sounds like very simple thing to do but it didnt to me when i thought that i had to abandon the perl script and rewrite the whole thing in java...
the important thing: what i learnt today opened whole new doors for me . i can convert all my wfts to wfms keeping most of the perl and cgi scripts with very minimal changes. of course i will eventually have to start making things in java, but that's gonna be for future projects.