Ron - Friday, August 24, 2007 3:22 PM:
I would like to know if there is a way to define who the routing of the workflow will be issued to, other then delegate.Our process for ECR’s is to have all ECR’s submitted to the Change Specialist 1, the users who belong to this group will make the decision, who has to approve a document. The approval depends on many things and is not practical to pre-define the assignees in a generic workflow such as the packaged ECR workflow.
The following group may be required to approve a document;
Design
NPI
Quality
Legal
Purchasing
Not all groups are required for every type of document, I know I can define these groups and assign a user to each group, then have this user delegate to the appropriate approver, but it would be a lot easier if at the Review ECR stage we could assign the needed approvers.
Looking for feed back on different ways to route for approval.
Thanks
RobMcAveney - Friday, August 24, 2007 10:45 PM:
Hi Ron -
You can accomplish this with dynamic assignments -- see http://aras.comhttp://www.aras.com/Community/files/folders/innovator_framework/entry23.aspx for an example. In your case, you may want to replace the "Reviewer" properties with check boxes for each group. Let me know if you need any help making the change.
Regards -
Rob
Ron - Monday, September 10, 2007 2:59 PM:
Hi Rob
Looks like I will need some additional help with this. I have installed the examples and tried out the Workflow Assignment Example and this is what I am looking for in the Standard ECR workflow for the Tech Review activity. I would like our Change Specialist 1 chose who is to review the ECR.
Problem is I am not sure how to make this work? I tied adding it as a subflow for the Tech Review activity, but this did not work, I am guessing that I need a new form to open to allow the CS1 to assign the user/groups to the tech review activity after they have completed the ECR Review, question is how to do this.
Thanks
Ron
SamsAn - Wednesday, September 12, 2007 6:01 AM:
Hi.
I guess Managed By functionality for the Tech Review activity will be helpful in your case. Please, consider the steps below (for the standard solution) to demonstrate it.
1. Go to AdministrationWorkflow Maps in the main tree and edit ECR map.
2. Select Technical Review activity and set Change Specialist I into Managed By field. Save the map.
3. Create a new ECR instance. Go to My InnovatorMy Inbasket of the main tree.
4. Select the row for the created ECR in the grid. RMBOpen Item.
-> ECR instance window appears.
5. Select ViewsWorkflow of the window menu.
-> ECR workflow process window appears.
6. Lock the process, select Technical Review activity. If the current logged in user belongs to CS1 group then you can add/remove assignments in Assignments tab, i.e. assign the user/groups to the tech review activity.
If you want to skip steps 4-5 (or simplify them), please, let me know.
Hope it helps.
RobMcAveney - Wednesday, September 12, 2007 6:34 PM:
Hi Ron -
Instead of opening a new form to choose the reviewers, I would suggest just adding those fields to the ECR. This would make it similar to the example, as the Reviewer 1/2/3 properties are on the controlled item. You can add boolean properties with names like design_review and npi_review and expose them on the ECR form. Then you can adapt the Workflow Assignment Example method to add assignments to the Tech Review activity based on the values of those properties. For example, if design_review is true, add an assignment for the Design identity. Alternatively, you can use item properties (as in the example) to assign a specific identity for the Design review.
SamsAn's solution is also a decent option -- you would be editing the workflow directly instead of via the method. As he mentioned, the user that would make the change needs to belong to the Managed By identity for that activity.
Regards -
Rob
Ron - Thursday, September 13, 2007 7:56 AM:
Thanks Rob
I was thinking about doing this on another workflow for a CAPA form, I like the idea of using a boolean properties to select which group to include. I'll post how things work out.
Thanks
Ron
Ron - Thursday, September 13, 2007 12:52 PM:
Hi Rob
I have created a form (CAPA) where on this form I have a property call "assignee1" and I modified the code form the example as follows;
' Get the controlled item
Dim innovator As Innovator = Me.newInnovator()
Dim controlledItem As Item = Me.newItem(Me.GetType(),"Get Controlled Item")
controlledItem.setID(Me.getID())
controlledItem = controlledItem.apply()
If controlledItem.isError() Then
Return controlledItem
End If
Dim assignment As Item = Me.newItem("Activity Assignment","")
Dim Assignee As String
Assignee = controlledItem.getProperty("Assignee1","")
assignment.setAction("add")
assignment.setAttribute("leaveLocked","0")
assignment.setProperty("source_id",Me.getID())
assignment.setProperty("related_id",Assignee)
Dim res As Item = assignment.apply()
If res.isError() Then
Return innovator.newError("Workflow Assignment: Error adding assignment: " & res.getErrorDetail())
End If
' Change the Activity text (just so a change is visible in the InBasket)
Dim activity = Me.newItem(Me.GetType(),"edit")
activity.setID(Me.getID())
activity.setProperty("message",CStr(Assignee)&" Assignments Added")
activity = activity.apply()
If activity.isError() Then
Return innovator.newError("Error editing activity: " & activity.getErrorDetail())
End If
I was hoping to simplify the code to look for one property and use it to assign the workflow to. I am getting an error when the code is executed.
Error :
InnovatorDatabaseException: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK__ACTIVITY___RELAT__290D0E62". The conflict occurred in database "InnovatorSolutions", table "innovator.IDENTITY", column 'ID'. The statement has been terminated. in SQL: UPDATE [ACTIVITY_ASSIGNMENT] SET related_id='37A40EB4CD2E442D84D86D6E9CE959EC' WHERE id='04E9EFAC53754F8CA1AF713D430386CC'<BR>Error while running method CAPA Assigee.
Looking for a little help with this code.
Thanks
Ron
RobMcAveney - Thursday, September 13, 2007 4:35 PM:
Hi Ron -
What data type and source do you have for property assignee1? The error message indicates that you are trying to set [ACTIVITY_ASSIGNMENT].related_id to an id value that does not exist in [IDENTITY].id, hence the foreign key conflict. The assignee1 data type should be item and the source should be Identity. Let me know if you still have problems after that is set correctly.
Regards -
Rob
Ron - Friday, September 14, 2007 1:23 PM:
Thanks Rob, I had the property set to User. Changing it to Identity work....
Ron