I have found that you can have a process action step which runs a job. We have a need for this as we wish to execute an Autoschedule on new projects as part of a "project create" process which performs a number of initial project setup activities.
The problem is, when you go to configure the Autoschedule job as an action step in a process, it wants direct input such as the project name, autoschedule date, etc. I was hoping these could be variables such as Project = project.thisproject and Autoschedule Date = project.thisproject.createdate (or whatever would be the correct syntax).
Does anyone have any ideas on how to accomplish this?
I can't think in an easy solution, but I think there are some ways to do it.
One method that I can think of may requires the creation of new OBS.
1) Schedule the autoschedule job to run. Set the job to autoschedule projects by a given OBS Unit (an OBS Unit that will be created only for that purpose).
2) In the "Project Create" process, in the step you want to run the autoschedule, place the project on the OBS Unit that the autoschedule job is monitoring. You can do that by XOG on a gelscript, or if the the OBS is the Department OBS, you may do that using a System Action.
3) Now you have to remove the project from the OBS Unit that the job is monitoring. You can do that with another job, that runs a process that removes all projects from the OBS Unit. This job should run some minutes after the autoschedule job. If you create an OBS just for that, you can just remove the projects from the OBS. If not, you may need a more complex logic to put the project back to it original OBS Unit.
- It is not online.
- You are exposed to some race conditions. If the "Project Create" process runs after the autoschedule job but before the OBS Unit clearance, the project won't be autoscheduled... You can minimize the chances of this situation to happen by modifying the OBS Unit clearance process, clearing only projects which OBS was modified before the last execution of the Autosheduled job.
This race condition can be minimized if you schedule the jobs to run daily, at night.
I never tried this procedure, so I may have missed something!