Rajiv - Wednesday, February 9, 2011 8:41 AM:
Hello everyone,
I want to execute a Method in which i am trying to fetch BOM and Document detals for a particular Part (Assmbly) and write it into a xml file.
I have already written a program in C#.Net where i can get the BOM and Document Details in table contents.
But I am not able to complie the same code when used it in the Methods.Moreover i want to know how to do create,complie and deploy a method and make it run at the end of a ECO Workflow.
Is there any document/help files for creating,compling and executing Method within/end of a Workflow(e.g. ECO).
Ronan - Wednesday, February 9, 2011 9:27 AM:
See the Workflow Automation Examples in the Community projects, they contain best practices, good sample code, and helper methods to interact with workflows and controlled items.
Rajiv - Thursday, February 10, 2011 8:42 AM:
I want to know how to associate a method to any workflow/workflow example.
When i try to associate a method which i had created,i cann't find it when i try to browse for that particular method
Ronan - Thursday, February 10, 2011 10:11 AM:
Hello
What do you mean by "can't find it"?
- Open the Workflow Map
- Lock the Workflow Map
- Select the final activity
- Click the "Server Events" tab
- Ensure "Pick Related" is selected
- Click on the "New" icon
Here you cannot find your method?
Rajiv - Monday, February 14, 2011 12:26 AM:
Yes here i cann't find the method i created in methods.Is there any way tp deploy the method so that it can be seen in the list of methods
PatrickW - Monday, February 14, 2011 8:40 AM:
Are you sure there is no (hidden) query entry? Did you create the method with the same user credentials as your workflow?
Rajiv - Thursday, February 17, 2011 2:27 AM:
Yes,i created the method with the same user credentials as my workflow,but i am not sure about any hidden query entry i have put following content in the method to create a file
var fileName = prompt("Enter the File Name:",""); var innovator = this.getInnovator(); var fileItem = innovator.getItemByKeyedName("File",fileName); if (fileItem.isError()) { top.aras.AlertError("File Not Found: " +fileItem.getErrorDetail()); return; } // Get the URL to the file and download it var fileURL = top.aras.getFileURLEx(fileItem.node); var folder = top.aras.vault.GetWorkingDir(); var results = top.aras.vault.downloadFile(fileURL); if (!results) { top.aras.AlertError("Unable to retrieve the file from the vault"); return; } // Open the file in Word. try { var word = new ActiveXObject("Word.Application"); word.visible = true; word.documents.open(folder + "\" + fileName); } catch(e) { top.aras.AlertError("Unable to launch Word. File saved as: "+folder+fileName); return; } Pls let me is ther any hidden query a part of the above mentioned.What settings i should do to make this method visible while trying to attach to a work flow process