Pass parameter to windows scheduled task - windows-task-scheduler

How do I pass parameters to a scheduled task?

Add the parameters to the end of the Run textbox in Properties

Related

Is there a way to pass a parameter to an airflow dag when triggering it manually

I have an airflow DAG that is triggered externally via cli.
I have a requirement to change order of the execution of tasks based on a Boolean parameter which I would be getting from the CLI.
How do I achieve this?
I understand dag_run.conf can only be used in a template field of an operator.
Thanks in advance.
You can not change tasks dependency with runtime parameter.
However you can pass runtime parameter (with dag_run.conf) that according to it's value tasks will be executed or be skipped for that you need to place operators in your workflow that can handle this logic for example: ShortCircuitOperator, BranchPythonOperator

How to get workflow taskId in Alfresco process service using script task

I wanted to get workflow taskId in a script task variable(Java Script/Groovy) and want's display it on user form.
Please let me know if you have any Idea regarding this.
we are using Alfresco process service 1.9 version
Thanks in Advance.
Store the taskId in a process variable using a *ExecutionListener. create a spring bean that implements the activiti Execution Listener, in the overriden method notify(DelegateExecution execution) set your variable like:
execution.setVariable("your_var", your_var_value);
In the Script Task you can access process variables using the Execution. e.g.:
execution.getVariable("your_var");
follow the developer series for more details.

Control-M Job Execution status

Is there any way in Control-M to pass the execution of the job without running the script?
Suppose i have passed all the parameters required for execution of job i.e. File Path, File Name , Node Id, Parameters but i want to run the job as dummy one but still want to successfully execute it and make it in green status.
Can we specify any command in Job Scheduling?
Yes, select 'dummy' as type of job and there is no need to pass command line to dummy job. It will get completed as soon as it gets the resource and you can use it as trigger for another job.
Regards,
Sahil Kondel
You can force set job OK in post-processing to get Green/Success status

How to get the user who initiated the process in IBM BPM 8.5?

How to get the user who initiated the process in IBM BPM 8.5. I want to reassign my task to the user who actually initiated the process. How it can be achieved in IBM BPM?
There are several ways to get that who initiated a Task , But who initiated a process Instance is somewhat different.
You can perform one out of the following :
Add a private variable and assign it tw.system.user_loginName at the POST of start. you can access that variable for user who initiated the process.(It will be null or undefined for the scenario if task is initiated by some REST API or UCA.)
Place a Tracking group after Start event . Add a input variable to it as username , assign it a value same as tw.system.user_loginName. So whenever Process is started entry will be inserted to DB Table.You can retrieve this value from that view in PerformanceDB.
Also there might be some table ,logging the process Instances details , where you can find the user_id directly.
I suggest you to look in getStarter() method of ProcessInstanceData API.
Official Documentation on API
This link on IBM Developerworks should help you too: Process Starter
Unfortunately there's not an Out Of The Box way to do this - nothing is recorded in the Process Instance that indicates "who" started a process. I presume this is because there are many ways to launch a process instance - from the Portal, via a Message Event, from an API call, etc.
Perhaps the best way to handle this is to add a required Input parameter to your BPD, and supply "who" started the process when you launch it. Unfortunately you can't supply any inputs from the OOTB Portal "New", but you can easilty build your own "launcher".
If you want to route the first task in process to the user that started the process the easiest approach is to simply put the start point in the lane, and on the activity select routing to "Last User In Lane". This will take care of the use case for you without requiring that you do the book keeping to track the user.
Its been a while since I've implemented this, so I can't remember if it will work elegantly if you have system steps before the first task, but this can easily be handled by moving the system steps into the human service to be executed as part of that call, rather than as a separate step in the BPD.
Define variable as string type and using script task to define the login user that use this task and assign it to your defined variable to keep to you in all of the process as initiator of the task.
You can use this line of code to achieve the same:
tw.system.user_loginName

How can I execute a callback after a set of asynchronous service calls complete?

In Flex, I'm making a set of asynchronous calls:
service.method1.send().addResponder(responder1);
service.method2.send().addResponder(responder2);
service.method3.send().addResponder(responder3);
I want to execute some code after all of these service calls have returned (either success or failure, I don't care which). How can I do this?
Implement a CallResponder that will monitor the results from each responder & increment a variable in the listener after each result. When the variable hits three, execute some code.

Resources