Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
77:process_feedback [2022/06/29 07:18] fnpk77:process_feedback [2024/02/15 00:00] (current) – external edit 127.0.0.1
Line 89: Line 89:
 </code> </code>
  
-  * ''source'': Which information from Stages should be taken +  * ''source'': Which information from Stages should be taken. See also picture below. 
-    * Attributes of current view where the user provides feedback +      * Attributes of current view where the user provides feedback 
-      * ''elementName'': e.g. "Analyze Scope" (Since Stages 7.8) +        * ''elementName'': e.g. "Analyze Scope" (Since Stages 7.8) 
-      * ''elementShortname'': e.g. "AS" (Since Stages 7.8) +        * ''elementShortname'': e.g. "AS" (Since Stages 7.8) 
-      * ''elementLabel'': e.g. "AS: Analyze Scope" (Since Stages 7.8) +        * ''elementLabel'': e.g. "AS: Analyze Scope" (Since Stages 7.8) 
-      * ''elementType'': e.g. "Workflow" (Since Stages 7.8) +        * ''elementType'': e.g. "Workflow" (Since Stages 7.8) 
-      * ''elementIdentity'': e.g. _wUV9sBbNHr-aicWx33VsQA (Since Stages 7.5.1.3) +        * ''elementIdentity'': e.g. _wUV9sBbNHr-aicWx33VsQA (Since Stages 7.5.1.3) 
-      * ''elementUrl'': Url to element +        * ''elementUrl'': Url to element 
-      * ''elementStableUrl'': Url to element with specific version (Since Stages 7.5.1.3) +        * ''elementStableUrl'': Url to element with specific version (Since Stages 7.5.1.3) 
-      * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3) +        * ''processVersionName'': e.g. V1 (Since Stages 7.5.1.3) 
-      * ''workspaceName'': e.g. Software Engineering +        * ''workspaceName'': e.g. Software Engineering 
-      * ''workspacePath'': e.g. Company > Software +        * ''workspacePath'': e.g. Company > Software 
-      * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) +        * ''workspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.1.3) 
-      * ''creatorFullname'': e.g. John Doe +        * ''creatorFullname'': e.g. John Doe 
-      * ''creatorUsername'': e.g. jdoe +        * ''creatorUsername'': e.g. jdoe 
-      * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2) +        * ''creatorEmail'': e.g. jdoe@example.com (Since Stages 7.5.2.2) 
-    * If process element was imported by module import, then the following attributes belongs to the imported source module. Otherwise or if process element is overwritten the attributes belongs to current view (Since Stages 7.9) +      * If process element was imported by module import, then the following attributes belongs to the imported source module. Otherwise or if process element is overwritten the attributes belongs to current view (Since Stages 7.9) 
-      * ''sourceModuleElementUrl'': Url to element if current element is imported by module import +        * ''sourceModuleElementUrl'': Url to element if current element is imported by module import 
-      * ''sourceModuleElementStableUrl'': Url to element with specific version if current element is imported by module import +        * ''sourceModuleElementStableUrl'': Url to element with specific version if current element is imported by module import 
-      * ''sourceModuleWorkspaceName'': e.g. Software Engineering +        * ''sourceModuleWorkspaceName'': e.g. Software Engineering 
-      * ''sourceModuleWorkspacePath'': e.g. Company > Software +        * ''sourceModuleWorkspacePath'': e.g. Company > Software 
-      * ''sourceModuleWorkspaceFullPath'': e.g. Company > Software > Software Engineering +        * ''sourceModuleWorkspaceFullPath'': e.g. Company > Software > Software Engineering 
-    * If process element was imported by multiple module imports, then the following attributes belongs to the module where the process element was created originally and can be edited. Otherwise or if process element is overwritten the attributes belongs to current view +      * If process element was imported by multiple module imports, then the following attributes belongs to the module where the process element was created originally and can be edited. Otherwise or if process element is overwritten the attributes belongs to current view 
-      * ''originElementUrl'': Url to editable element if current element is imported by module import (Since Stages 7.5.1.3) +        * ''originElementUrl'': Url to editable element if current element is imported by module import (Since Stages 7.5.1.3) 
-      * ''originElementStableUrl'': Url to editable element with specific version if current element is imported by module import (Since Stages 7.5.1.3) +        * ''originElementStableUrl'': Url to editable element with specific version if current element is imported by module import (Since Stages 7.5.1.3) 
-      * ''originWorkspaceName'': e.g. Software Engineering (Since Stages 7.5.2.2) +        * ''originWorkspaceName'': e.g. Software Engineering (Since Stages 7.5.2.2) 
-      * ''originWorkspacePath'': e.g. Company > Software (Since Stages 7.5.2.2) +        * ''originWorkspacePath'': e.g. Company > Software (Since Stages 7.5.2.2) 
-      * ''originWorkspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.2.2) +        * ''originWorkspaceFullPath'': e.g. Company > Software > Software Engineering (Since Stages 7.5.2.2)
   * ''target''  and ''targetType'': Defines feedback system specific configuration   * ''target''  and ''targetType'': Defines feedback system specific configuration
 +[[https://doc.stagesasaservice.com/lib/exe/detail.php?id=77:process_feedback&media=77:feedback-source.png|{{  :77:feedback-source.png?400  }}]]
 +
 === Custom Attribute Mappings === === Custom Attribute Mappings ===
  
Line 138: Line 139:
  
 <code javascript> <code javascript>
-var user = currentElement.getProperty("LastChangeUser"); +if(currentElement) { 
-result.mappings.put("lastChangedBy", user); // Add script-attribute-mapping 'lastChangedBy'+    var user = currentElement.getProperty("LastChangeUser"); 
 +    result.mappings.put("lastChangedBy", user); // Add script-attribute-mapping 'lastChangedBy' 
 +}
 result.properties.put("project", "Demo"); // Override property 'project' result.properties.put("project", "Demo"); // Override property 'project'
  
Line 166: Line 169:
 </code> </code>
  
-The script can access the process element of the feedback ''currentElement''.+The script can access to several information of the process: 
 + 
 +  * Current process element''currentElement''  (in case of process start page it is null) 
 +  * Current user: ''currentUser'' 
 +  * Logger: ''log'' 
 +  * Pkit: ''pkit'' 
 +      * Current version of process: ''pkit.getCurrentProcess()'' 
 +      * Current workspace: ''pkit.getCurrentProject()'' 
 +      * … 
 + 
 +The script cannot access the information that the user entered into an Attribute.
  
 All results have to be stored to the predefined ''result''  variable. All results have to be stored to the predefined ''result''  variable.
Line 172: Line 185:
   * Values in ''result.mappings''  are configurable in the xml via ''script-attribute-mappings''   * Values in ''result.mappings''  are configurable in the xml via ''script-attribute-mappings''
   * Values in ''result.properties''  will add or override the ''properties''  of the xml file   * Values in ''result.properties''  will add or override the ''properties''  of the xml file
 +
  
 ==== Stages metamodel ==== ==== Stages metamodel ====
  
-The feedback widget must be added to your Stages metamodel. The XML-Element is:+The feedback widget must be added to your Stages metamodel. We suggest to consult your Product Consultant for this step. 
 + 
 +The XML-Element is:
  
 <code xml> <code xml>
Line 202: Line 218:
  
 </code> </code>
 +
  
 ==== Stages language properties ==== ==== Stages language properties ====