Version: 2022.1.2

HSAddOns

Components

CaseDetails

In inPoint a window can be opened via ContextMenu on folders or documents in which all details of the current workflow cases are displayed.

Example: ContextMenu on a document for which there is currently a workflow named "Urlaubsantrag von max (MUSTERMANN Max)". CaseDetails Contextmenu Workflow case details

Then a window opens with the case details: CaseDetails case details

Configuration

The assigned element format must have a field with the general name WFCases (do not display).
Depending on whether it should work on folders or on documents, the field must be added to the respective folder or document fields.

Folder fields:
CaseDetails Configuration folder fields

Document fields:
CaseDetails Configuration document fields

After that the context menu is visible for all folders/documents where this element format is assigned.
If no workflow is active, it is displayed as "not active".

In the workflow process, a function must then be called at the beginning and at the end.

There are two new methods in the "Functional Processes/Attributes":

  • AddCaseId
    Sets the respective Ivy Case ID and description for all passed itemUris.
  • ClearCaseId
    Deletes the respective Ivy Case ID for all passed itemUris.

Before the WF Case is assigned to a "User Task" or "Task", a "Subprocess Call" must be executed for the method AddCaseId:
CaseDetails Configuration AddCaseId

And before the WF ends a "Subprocess Call" for the method ClearCaseId must be executed:
CaseDetails Configuration ClearCaseId

DocumentGrid

To use the "DocumentGrid", the following must be inserted in the respective view:
Add to the namespaces:

xmlns:ic="http://ivyteam.ch/jsf/component"

Where it should be placed:

<ic:at.hs.addon.DocumentGrid 
documentItemUris="#{data.documentItemUris}"
newDocTargetFolderItemUri="#{data.targetFolderItemUri}" />

It can also be added with D&D from the "Palette". Under "Ivy Components" the name "DocumentGrid" is shown.
Palette DocumentGrid

Both parameters are required in the data class for the respective dialog:
Dataclass for ProcessChain

  • documentItemUris
    A list with all itemUri to be displayed in the DocumentGrid.
  • newDocTargetFolderItemUri
    itemUri that points to a folder. When new documents are uploaded, this itemUri is used as the destination. If this value is not set, the button "Upload file" is not displayed!

Example, if newDocTargetFolderItemUri is not set:
DocumentGrid example newDocTargetFolderItemUri not set

Example, if newDocTargetFolderItemUri is set ("Datei hochladen" button is shown):
DocumentGrid example newDocTargetFolderItemUri set

DocumentGrid with inPoint.Web Preview

Since inPoint 2018.4 and the associated HSAddOns 7.0.54, it is possible to use DocumentGrid to display a document preview. A new property PreviewURL has been added to the existing class WFDocument. If all documents are retrieved via the HSAddOns, this new property will also be filled with an encrypted inPoint.Web Preview URL. This URL is then used in the workflow to display the preview. All file types that can also be displayed by inPoint.Web are supported!
NOTE: The ivy session user is taken and encoded in the preview URL, which means that this user must exist in inPoint and also must have permissions for the respective itemUri.

In the inPoint server web.config the key WebUrl with the complete inPoint.Web URL must be entered inside the pamSettings.
Also in the web.config inside the pamSettings the key secureParamsSecret must be set to any random value. This value must be identical to the value in the appsettings.json for inPoint.Web and inPoint.Identity!

The used SecureParams also support User Impersonation. To active it, open the inPoint server web.config and change the value for the key WebImpersonate to true. Then the inPoint.Identity Login is never shown! But be aware, if someone else gets the generated link he is able to view the document as well with the impersonated user!

Add the normal DocumentGrid, but three parameters must be added:

<ic:at.hs.addon.DocumentGrid 
startMethod="startInPointWebPreview"
documentItemUris="#{data.documentItemUris}"
newDocTargetFolderItemUri="#{data.targetFolderItemUri}"
enableInPointWebPreview="true"
showPreviewAsOverlay="false" />
  • startMethod
    Defines another method with which the DocumentGrid is started.
  • enableInPointWebPreview
    Can have the values true or false.
    • true
      URL for PDF icon per document points to inPoint.Web
    • false
      URL for the PDF icon per document points to the inPoint.Sync via inpoint:preview.
  • showPreviewAsOverlay
    Can have the values true or false.
    • true
      When you click on the PDF icon, the preview opens in an overlay panel (PrimeFaces LightBox).
    • false
      When the PDF icon is clicked, the preview opens in the integrated "Preview" component. It can also be clicked with the CTRL key pressed, then the preview opens in a new browser tab.

If an integrated preview is desired, the Ivy component "Preview" must be placed at the desired position in the Workflow View.

<ic:at.hs.addon.Preview></ic:at.hs.addon.Preview>

Alternatively you can simply embed an iframe, just set the name of the iFrame to inPointWebDocPreviewIFrame.

<iframe name="inPointWebDocPreviewIFrame" width="100%" height="100%" />

Example, when only DocumentGrid and Preview components are used:

<h:form id="form">
<div class="p-grid p-dir-col-rev">
<div class="p-col">
<div class="box" style="height:600px">
<ic:at.hs.addon.Preview></ic:at.hs.addon.Preview>
</div>
</div>
<div class="p-col">
<div class="box">
<ic:at.hs.addon.DocumentGrid
startMethod="startInPointWebPreview"
documentItemUris="#{data.documentItemUris}"
newDocTargetFolderItemUri="#{data.targetFolderItemUri}"
enableInPointWebPreview="true"
showPreviewAsOverlay="false" />
</div>
</div>
</div>
</h:form>

CaseNotes

To use the "CaseNotes", the following must be inserted in the respective view:

Add to the namespaces:

xmlns:ic="http://ivyteam.ch/jsf/component"

Where it should be placed:

<ic:at.hs.addon.CaseNote caseId="#{ivy.case.getId()}" />

It can also be added with D&D from the "Palette". Under "Ivy Components" the name "ProcessChain" is shown.
Palette CaseNotes

Only one parameter is required in the data class for this dialog:
Dataclass for CaseNotes

  • caseId
    Normally always #{ivy.case.getId()}.

No notes:
CaseNotes No notes

Add new Note:
CaseNotes Add note

Notes added:
CaseNotes Notes added

Processes

Attribute

To read or set attributes there are some sub processes in the HSAddOns project which can be called easily. To do this, use the "Call" element under "Activity" from the "Palette".
Attribute Call

Select the following in the tab "Process call" at "Process:" Attribute Select Process

At "Start" the following methods can be selected:

  • GetAll
    Returns all properties of an itemUri.
  • GetMultiple
    Returns only properties from an itemUri and a list of property names.
  • GetSpecific
    Returns exactly one property from an itemUri and one property name.
  • SetMultiple
    Sets multiple property values for an itemUri.
  • SetSpecific
    Sets a property value for an itemUri.
  • AddCaseId
    Sets the CaseId with a name for a list of itemUri.
  • ClearCaseId
    Deletes the CaseId for all itemUri passed.

Document

Select the following in the "Subprocess Call" under "Select Process":
Document Select Process

The following methods are available for "Start":

  • GetDocuments
    Returns all documents for a list of itemUri.
    • Starting from version 7.0.111 the Axon.ivy username have to be passed! This username is transferred to the WCF Method and user for the previewURL, which is created for each document.
      NOTE: inPoint_HSAddOns_DomainName must be configured!
  • CreateDocument
    Archives a file to the specified itemUri and returns the created document itemUri.
  • CreateDocumentDifferentUser (7.0.111)
    Archives a file to the specified itemUri and returns the created document itemUri.
    • The Axon.ivy username have to be passed! This username is transferred to the WCF Method and user for the previewURL, which is created for each document.
      NOTE: inPoint_HSAddOns_DomainName must be configured!
  • UpdateDocument Changes a document to the transferred file
  • UpdateDocumentDifferentUser (7.0.111)
    Changes a document to the transferred file
    • The Axon.ivy username have to be passed! This username is transferred to the WCF Method and user for the previewURL, which is created for each document.
      NOTE: inPoint_HSAddOns_DomainName must be configured!
  • CreateReport
    Archives the WF report and links all itemUri passed to the newly created document.
  • UpdateReport
    Modifies a WF report and links all itemUri passed to the modified document.
  • CreateReportHidden (7.0.5)
    Archives the WF report and links all itemUri passed to the newly created document. The archived report is not visible in the inPoint Client.
  • UpdateReportHidden (7.0.5)
    Modifies a WF report and links all itemUri passed to the modified document. The updated report is not visible in the inPoint Client.
  • DeleteDocuments (7.0.5)
    Marks all passed document itemUri as deleted.
  • MoveDocument (7.0.55)
    Moves a document to a different folder.
    • The nameValues must be filled when a document is moved to another folder with a different format set. If certain fields are required, they have to be filled in here.

Report

Select the following in the "Subprocess Call" under "Select Process":
Report Select Process

The following methods are available for "Start":

  • CreateDefaultReport
    Creates a report for the current case from an word template and archives it.
  • CreateDefaultReportHidden (7.0.55)
    Creates a report for the current case from an word template and archives it. The archived report is not visible in the inPoint Client.
  • CreateDefaultReportAction (7.0.55)
    Creates a report for the current case from an special word template (date, comment, user, pressed button) and archives it.
  • CreateDefaultReportActionHidden (7.0.55)
    Creates a report for the current case from an special word template (date, comment, user, pressed button) and archives it. The archived report is not visible in the inPoint Client.

NOTE: The language in which the reports should be created can be changed with the global variable called inPoint_HSAddOn_Locale. Default is de, currently only en as other value is supported!

Example call: Report Example call

Security

In the "Subprocess Call" under "Select Process" select the "Security" process.

The following methods are available for "Start":

  • GetRights
    Returns all permissions set on the passed itemUri.
  • SetRights
    Sets all passed permissions on the passed itemUri.
    • itemUri itemUri from folder or document.
    • removeChildrenRights If "true", the permissions are applied to all sub-folders.
    • rights List of permissions to be set.
      NOTE: The communication user should always be listed here with all permissions, otherwise it can happen that no one has access anymore!

In the class ItemRight, only the userId or only the groupId or both can be set.
The EnumSet rights, can be initialized like this:

  • All permissions
    EnumSet.allOf(ItemAllowedRights.class);
  • Specific permissions
    EnumSet.of(ItemAllowedRights.FolderRead,ItemAllowedRights.FolderEditReminder,ItemAllowedRights.DocumentRead,ItemAllowedRights.DocumentModify);

Share

In the "Subprocess Call" under "Select Process" select the "„Share" process.

The following methods are available for "Start":

  • ShareFolder
    Shares a folder with one or more groups/users.
    • makeShareNameUnique
      If the shareName passed is not unique, the server itself can generate a unique name.
    • itemUri
      itemUri from the folder
    • shareName
      Name to use for the share.
    • folderPermissions
      Rights for users/groups
    • shareForever
      If "true", the share will be valid forever.
    • shareUntil
      Until when this share should be valid.
    • disableMailNotification (7.0.110)
      If "true", no mail is sent to the users/groups.
  • ShareDocument
    Shares a document with one or more groups/users.
    • makeShareNameUnique
      If the shareName passed is not unique, the server itself can generate a unique name.
    • itemUri
      itemUri from the document
    • shareName
      Name to use for the share.
    • documentPermissions
      Rights for users/groups
    • shareForever
      If "true", the share will be valid forever.
    • shareUntil
      Until when this share should be valid.
    • disableMailNotification (7.0.110)
      If "true", no mail is sent to the users/groups.
  • RemoveShare
    Ends sharing a folder or document.
    NOTE: The passed itemUri must contain the "share" part!

inPoint.Core REST

This section describes how to use the inPoint.Core REST interface.
inPoint.Core must be installed and configured with a valid certificate. Furthermore the Basic Authentication must be activated and configured.

Documentation from Axon.ivy: Axon.ivy Designer REST Clients

In the Axon.ivy Designer in the respective project from which REST calls are to be made, click on "Rest Clients" under "Definitions".
Then click on "Add Client" and enter "inPoint.Core" as the name. (Can also be named differently)
After clicking on "Finish" the REST Client can be configured.
The URL to the inPoint.Core server must be entered for the URI. Should start with https!
For authentication, select "HTTP Basic" and enter the username/password (as configured in the appsettings.json).

Depending on where in the process a REST call is to be made, simply add the "REST Client" (under "Activity") and open it with a double click.
To make all further settings, I recommend to open the inPoint.Core Swagger website.
The Swagger contains all necessary information + interface documentation!

Example: Creating a new folder
inPoint.Core POST folders Request
inPoint.Core POST folders Response

Example: Full text search with "simple search"
inPoint.Core GET search Request

Example: Full text search with "advanced search"
inPoint.Core POST search Request

Example: Linking a Document
inPoint.Core POST links Request

Helpful tips

If an itemUri is entered in the "Body" as "raw", the \, must be written with \\\\,. (See screenshot)

Each response can be parsed as String and JsonNode. The JsonNode class has some helper methods to read values from the JSON.

But if you want the complete response to be available as a class, there is an easy way:

  • Read and copy the result once as string JSON format
  • Use jsonschema2pojo, copy the JSON into it and create Java classes.
  • Create the Java Classes in Axon.ivy
  • Select the generated class in the "Response" tab at the top right.

Then you can simply access the properties of the class!

Start a Workflow with WCF

If a workflow should be started via Pam4ERP. Then a "Signal Start" event must be used in the WF.
Start a workflow with WCF Signal Start

The signal code is always composed of: at:hs:addon:startworkflow:+name of the WF.
If a WF is started by SAP, then there is a parameter "wfName" which must pass this "name of the WF".

For example:
Start a workflow with WCF Start Event

In the output code the SignalData can be accessed with:

import at.hs.addon.StartWorkflowData;
StartWorkflowData data=signal.getSignalData() as StartWorkflowData;

StartWorkflowData' is defined as follows:
Start a workflow with WCF Dataclass

NOTE: A User Dialog at the WF start is then not possible!