I have some workflows with dependency.
I want to wait for the previous workflow done, then continue the next one.
I am trying to use the Wait Node, but it seems that it cannot detect file creation/modification/deletion in SharePoint.
How can I realize this control to workflows or metanodes?
Please see example below. It may provide you some ideas.
Hi @cuimaple,
the “Call Workflow” nodes could be interesting for your use case, especially the “Orchestration” part of the Cheat Sheet. Some resources are also linked in this topic: use data from another workflow into current workflow - #2 by mlauber71
With Call Workflow Service, Call Workflow (Table based, Row based), etc. you can call subworkflows from a main workflow that orchestrates the subworkflows and makes sure dependencies between subworkflows are in place.
I think this will lead to a more maintainable collection of workflows than using files and the Wait node.
Hi,
Thanks for your suggestion. But what if I need to detect a file change in SharePoint? That file is not generated by Knime workflow. Actually that is generated by somebody else, the update time can be variated in minutes, or sometime he forgot to update. But I don’t want my workflow run with old data, so I want to detect the change date of that file, then run my knime workflow.
How can I realize this function?
@cuimaple maybe you can extract some meta information and compare them to a previously stored record and if the file is newer start your workflow.
The “automation” is a workflow running permanently.
Hi,
Thanks for your sharing, but your case is a little bit too complicated to me.
My target is that:
- check the sharepoint file modification date every 5 mins.
- if the modification date is today, then continue the workflow, otherwise, go back to step 1 check the file meta information after 5 mins.
Do you know how can I realize this and what nodes should I use? Do you have a demo for it? Thanks in advance.
@cuimaple without a KNIME Business Hub you will face some kind of complexity. That being said I have created a sample workflow that would check the last date a file has been changed on a drive (here simulated using a local folder) - and if there has been a change compared to the last recored date a sub-workflow will be called and the new change date will be recorded in the CSV file. KNIME CSV writer has the option to append lines without writing the header. So it is suitable for recording such developments.
The main workflow will run every 10 seconds (you can change that to 5 minutes) and will run until you stop it due to a condition loop end that never will be met.
The information when the file was last modified will be checked with the help of the Files/Folders Meta Info – KNIME Community Hub - the remote connection (the blue connections) in this case is a local folder so the example can be run in a local environment but they can be substituted for a Sharepoint connection or other remote connection.
Hi,
Your solution is very helpful!!
I am trying to use batch mode + task scheduler to schedule the execution.
But when I execute in batch mode, it shows below error message. I have try all the 3 kinds of “workflow location”, all failed. Do you have any idea to call workflow with batch mode?
finally solved this issue with article: Execute workflow with command line. Execute failed: Cannot determine ID of local mountpoint
@cuimaple ist seems that relative path do not work well from batch mode. What you can do is provide the path to the workflow as a fixed workflow variable or as an absolute path.
@cuimaple all the better if local setting does work. Very well.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.