Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Rule to use current workflow when a request is copied

Highlighted
Scott A Wood
Regular Collector

Rule to use current workflow when a request is copied

As we change our workflows, we create new "versions" and update our request types so that they use the new workflow as the default (by using a rule)

We requests are copied, the old, original version of the workflow is used. Can rules be used to ensure that the current version of the workflow is used on these copied requests? If so, what are the settings?

Thanks,

Scott
29 REPLIES
Chandru M
Occasional Contributor

Re: Rule to use current workflow when a request is copied

Hi Scott,

Open the request type in workbench, click on rules tab. Here you can see the Rule with the Rule Event "Apply on Creation" to populate the workflow.

Select the new workflow name here.

Hope this helps.

Regards,
Chandru
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

We currently use an apply on creation rule, but this rule is not applied when the request is copied.
Chandru M
Occasional Contributor

Re: Rule to use current workflow when a request is copied

Scott,

Create new rule as shown in figure.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

That is actually what we have, but it doesn't work on copied requests that reflect an old version of the workflow. I've attached an image of one of the rules that we use.
Chandru M
Occasional Contributor

Re: Rule to use current workflow when a request is copied

So you have rule set up in new copied request type and it has old workflow. Am I caorrect?

If yes, Please select the new workflow.

If the new workflow is not reflected while selecting the workflow, please check whether the workflow is enabled or not.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

We have used the default workflow rule for several years and actually don't allow our users to select workflows. On the new requests, the rule has always just used the new workflow. But on the copied requests, it also copies the old workflow.

My guess is that PPM bypasses the "Apply on Creation" rules and default values when a request is copied.
Chandru M
Occasional Contributor

Re: Rule to use current workflow when a request is copied

Did you try deleting and recreating the rule for selecting the workflow. Also just try crearing the cache.
Chandru M
Occasional Contributor

Re: Rule to use current workflow when a request is copied

Also use the below query and see if the requestes created using the spectific request type are using the workflow in the rule or not.

SELECT kr.request_id, kr.creation_date, kr.last_update_date, ku.full_name,
kr.description, kr.workflow_id, kw.workflow_name
FROM itg.kcrt_requests kr,
itg.kcrt_request_types krt,
itg.kwfl_workflows kw,
itg.knta_users ku
WHERE kr.request_type_id = krt.request_type_id
AND kr.workflow_id = kw.workflow_id
AND kr.last_updated_by = ku.user_id
AND kr.status_code = 'IN_PROGRESS'
AND krt.request_type_name = 'Incident - 2008'
Jim Esler
Honored Contributor

Re: Rule to use current workflow when a request is copied

None of the 'on creation' rules are executed when you copy a request. This is the key reason we disable the Copy button.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

Jim,

That is what I thought. Do you have any suggestions on making a rule default the workflow even though these rules are not envoked? I would get many complaints if I try to disabled the copy feature.
Jim Esler
Honored Contributor

Re: Rule to use current workflow when a request is copied

We have just recently upgraded to 7.5 and are still investigating the new features for rules. I have not tried this but it might work to have a rule triggered on page load and request status of Not Submitted. Please let me know if this does work.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

That is a great idea. I'll let you know what I find.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

I tried it out on PPM 7.5 and it doesn't work. The "On Page Load" rules don't seem to be applied before the request is submitted.

You had mentioned that you disabled copy. How is this done and can it be done for specific request types?
Jim Esler
Honored Contributor

Re: Rule to use current workflow when a request is copied

We disable the Copy button by modifying a line in deploy/itg.war/web/knta/crt/RequestSecButtons.jsp. The released version of the line is:

if (requestCtrl.canUserCopyRequest() && !requestCtrl.isPFMProjectRequest()) { %>

We have changed this to:

if (requestCtrl.canUserCopyRequest() && 1==0) { %>

This suppresses the Copy button unconditionally. You could develop more selective criteria that could meet your needs.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

I'll open a ticket with HP on the updating the workflow when a request is copied. If they give me a good answer, I'll post it here.
Dale Colliver
Regular Collector

Re: Rule to use current workflow when a request is copied

I have not tried this, but it might work. Change your workflow to a sub flow and then create a new workflow that will be assigned by the rule. The new workflow would only have 2 steps, the first an execution that it would just pass through and the second call to the subflow. I doubt that the subflow step would work as the first step. As you make new versions of the subflow, change the main flow to call the new subflow. It would mean that your main flow would over time have a lot of dead steps pointed to old sub flows and if users look at the graphical view, they would always have to drill down to it. Your main flow name would never change so the copy problem should be resolved.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

Thanks for the suggestion. There are other reasons the approach would not work for us that I won't get into here, although it may work for someone just getting started..

I did want to let folks know I did open a ticket with HP on this and there is an existing enhancement on the books for this. If this is a feature that others want, then I would recommend also opening a ticket so that your names are added to the enhancement. This seems to be the only way we have to let HP know which enhancements are important to us.
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

We finally found a solution to this issue, simular to what someone else had suggested before. We created a rule that executes on field change when the status is "Not Submitted", the current workflow is not assigned, and the Description field is updated. Since the description field is almost always updated, this resolves the issue for us.
M. Habitzki
Super Collector

Re: Rule to use current workflow when a request is copied

Hello Scott,

this thread describes the similar Problem I have with the "Make a copy" button and your solution sounds good.

But how do I call the "Current Workflow" in an advanced Rule (which I need here)?
I never did this before.

Kind regards

Matthias
M. Habitzki
Super Collector

Re: Rule to use current workflow when a request is copied

Ok, I found it when digging a bit in other implementation. I don´t need any further feedback but to share with others I will post here the Rule screenshot. Only the name of the Workflow is replaced in this screenshot.

Regards
Matthias
Scott A Wood
Regular Collector

Re: Rule to use current workflow when a request is copied

We ending up doing something simular, except based it off of updating the Short Description field. Seems to work well. Some of the other fields didn't work for us, because they aren't always updated on a copied request.
M. Habitzki
Super Collector

Re: Rule to use current workflow when a request is copied

Thank you Scott for the feedback, I also found during my tests that the Description Field is not the right one to cover the "Make a copy" scenario.
I am still checking which is the right field in our Demand Requests.
It depends also a bit on the different customer, several use a clean-up of some fields in case of "Make a copy". Others don´t use this.

I also tried to use the Request ID change or the Creation Date change as a trigger but that´s not yet well working.

We´ll see.

Regards
Matthias
Jim Esler
Honored Contributor

Re: Rule to use current workflow when a request is copied

You do not mention what release level you are running, but the new 7.5 SP7 release has an new UI rule type of Apply on Copy. We have not experimented with it much yet but this may be intended for dealing with this deficiency. I don't think it is included in 8.0 or 9.1 service packs yet but it is reasonable to assume it will be coming soon.
M. Habitzki
Super Collector

Re: Rule to use current workflow when a request is copied

Oh yes, I didn´t mention the Version and SP.
It´s 7.5 SP 6.

Kind regards
Matthias

//Add this to "OnDomLoad" event