![Aras innovator training Aras innovator training](https://community.aras.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-04/method_2D00_editor.gif)
Grow your team on GitHub
GitHub is home to over 40 million developers working together. Join them to grow your own development teams, manage permissions, and collaborate on projects.
Sign upIn this post, we'll show how to use an activity variable to update a read-only (protected) field, and even share the source code needed to enable.
External-Input-Example
This is a very simple Visual Studio Web Application that includes several text boxes and a button. A user will be able to fill in data into the text boxes, and once the user clicks the 'Submit' button, a connection to Aras Innovator is made during which it creates a new PR with the given data provided by the user.ASP MIT 5 1 0 1 UpdatedJul 31, 2019 toc-search-bar
Adds a search bar to the top of the TOC that allows users to search for specific ItemTypesASP MIT 5 4 2 0 UpdatedJun 11, 2019 ext-workflow-assignment
Custom workflow assignment functionality.ASP 1 2 0 0 UpdatedApr 27, 2017 community-site-example Archived
Source code for hosting a collaborative software dev. site based on Innovator. [ARCHIVED]
(Aras PLM Server Side Method ) Get Controlled Item when called within a method triggered from a Workflow
GetControlledItem.cs
// Retrieve the workflow item(s) |
Innovatorinn=this.getInnovator(); |
ItemwflItem=this.newItem('Workflow','get'); |
wflItem.setAttribute('select','source_id,source_type'); |
ItemwflProc=wflItem.createRelatedItem('Workflow Process','get'); |
wflProc.setAttribute('select','name'); |
ItemwflProcAct=wflProc.createRelationship('Workflow Process Activity','get'); |
wflProcAct.setAttribute('select','related_id'); |
wflProcAct.setProperty('related_id',this.getID()); |
wflItem=wflItem.apply(); |
if (wflItem.getItemCount() <1||wflItem.getItemByIndex(0).getProperty('source_id','').Length!=32|| |
wflItem.getItemByIndex(0).getPropertyAttribute('source_type','keyed_name','').Length<1) |
{ |
returninn.newError('Error retrieving workflow: '+wflItem.getErrorDetail()); |
} |
// Build a list of ids For the versions of the controlled item |
StringBuilderidList=newStringBuilder(); |
for (inti=0; i<wflItem.getItemCount(); i++) { |
if (wflItem.getItemByIndex(i).getProperty('source_type','') !=wflItem.getItemByIndex(0).getProperty('source_type','')) |
{ |
returninn.newError('Error: Workflow Process attached to items of different types'); |
} |
idList.Append('''+wflItem.getItemByIndex(i).getProperty('source_id','') +'','); |
} |
idList.Remove(idList.Length-1, 1); |
// Retrieve the current item controlled by the workflow |
stringcontType=wflItem.getItemByIndex(0).getPropertyAttribute('source_type','keyed_name',''); |
ItemcontItem=this.newItem(contType,'get'); |
contItem.setProperty('is_current','1'); |
contItem.setProperty('id',idList.ToString()); |
contItem.setPropertyAttribute('id','condition','in'); |
contItem=contItem.apply(); |
if (contItem.getItemCount() !=1) returninn.newError('Error retrieving controlled item: '+contItem.getErrorDetail()); |
returncontItem; |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment