Activiti
Table of Contents

Version 1.5.0, August 2016

1. Alfresco Activiti Share Connector

Alfresco Activiti Share Connector enables you to start and run Activiti processes, and tasks in an Alfresco Share environment. You can create process definitions in Alfresco Activiti, and deploy them to Alfresco Share using a pre-defined Alfresco Share App. Installing Activiti Share Connector changes the standard Alfresco workflow and task management to access the Activiti processes and tasks by default, however you can still use the standard Share workflow capabilities.

After you have installed Activiti Share Connector on an Alfresco system, the following new features are available:

  • The Activiti user interface for working with processes and tasks embedded in the Alfresco Share user interface.

  • A Review Process app displayed in the Activiti user interface that includes the following pre-defined process definitions:

    • Ad hoc Task

    • Group ad hoc task

    • Review and Approve - Group

    • Review and Approve - Single person

      The above four processes are already deployed to Alfresco Share. When you start a workflow in Alfresco One, you can choose from any of the pre-defined processes.

  • Capability to add native Alfresco Share users when selecting people and documents in a workflow.

  • A new option in Alfresco Share to add a new My Activiti Tasks dashlet to your home dashboard. This dashlet shows tasks created using Activiti Share connector. You can filter the tasks shown by: Active Tasks, Completed Tasks, Tasks Due Today, Tasks Assigned to Me, Unassigned (Pooled Tasks), and Overdue Tasks.

  • Options to create Activiti workflows when initiating a workflow on a document in Alfresco Share, or from the My Activiti Tasks dashlet.

  • The old Alfresco My Tasks dashlet, so you can still see the old internal workflows and receive new site invitations.

  • The old Alfresco My Tasks page by clicking My Workflow Tasks on the new Activiti My Tasks page, so you can still work with your old internal tasks.

  • The old My Workflows page by clicking Workflows I’ve started on the new Activiti Processes page, so you can still work with your old internal workflows.

  • The Workflows panel on the Document details page listing both internal and external workflows.

1.1. Using the Share connector demo

Follow these steps to start creating and running processes in Alfresco Share.

The LDAP demo server installed with the demo includes four fixed users. The password for each user is password. The following four users are set up so you can try out various groups and user scenarios.

  • jluc is a tenant manager in Activiti, a user in Alfresco, and in the groups engineering and marketing.

  • kirk is a tenant admin in Activiti, a user in Alfresco, and in the group engineering.

  • wesley is a user in Activiti and a user in Alfresco. He is not a member of any group.

  • admin is an admin in Activiti and an admin in Alfresco. This is the only user who has the ability to deploy process definitions from Activiti to Alfresco Share.

  1. Go to the installed Alfresco Share system at http://localhost:8090/share and login with the following user credentials:

    userid: admin

    password: password

    Activiti Share Connector installs a demo LDAP system which provides several fixed userid/password pairs. The admin user Id provides permissions to start tasks and processes on Alfresco Share, and to create and deploy processes and apps on the embedded Alfresco Activiti app.

  2. On your personal dashboard, click the Tools icon on the top-right and add the My Activiti Tasks dashlet.

    This dashlet is now displayed as well as the original My Tasks dashlet. Use the new dashlet to control Activiti processes and tasks inside Alfresco Share.

  3. Go to the Activiti app at http://localhost:8080/activiti-app/, and login with the userid admin and the password password.

    In the embedded Activiti app, you can create process definitions and deploy them to Alfresco Share.

1.1.1. Starting a workflow on a file

In your site’s document library, you can start a workflow on one or more files. The following steps describe how to initiate a workflow using one of the pre-defined Activiti processes on two files.

Prerequisite: You must create your own site and have some files and folders added to it.

  1. Find the file(s) you want to start the workflow on and click Selected Items > Start Workflow in the menu bar.

    The Start Workflow page appears.

  2. Select the Ad hoc Task predefined process from the list of processes.

    The start form for the process is displayed.

    Note that the two files selected are already shown in the upload field of the form. When you start a workflow on a file or files, the selected content items are always associated with the first upload field in the process definition.

  3. Fill in the start form, assigning the process to yourself, and click Start process.

    The process is initiated, and the first task appears active.

You have successfully started an Activiti process on the selected files in an Alfresco site.

1.1.2. Starting a workflow in Alfresco Share

This tutorial walks you through the steps required to run your first Activiti process as a workflow from Alfresco Share using the My Activiti Tasks dashlet.

All process definitions that you deploy to Apps in Alfresco Activiti are available to you in Alfresco Share. This section assumes that you have deployed the first process workflow using the app-creating-process tutorial described in the Activiti Administrator’s Guide. If not, follow the tutorial to deploy the workflow.

  1. Go to your Alfresco Share dashboard, http://localhost:8090/share.

    You run an Activiti process in Alfresco Share as a workflow.

  2. In your My Activiti Tasks dashlet click Start workflow.

    The Start workflow dialog appears.

    Note that the alphabetical list of process definitions includes your First Process.

  3. Select your First Process.

    The workflow is initiated and the page now displays the form for the start task in this workflow, just like it does in the Activiti app.

  4. Fill in the form.

    Note that when you click the Select a file button for the Project files, a dialog to choose a file for Alfresco Share appears to select files from your Alfresco repository.

  5. Click Start process to start the workflow.

    The My Workflow page now displays the active and completed tasks in your workflow.

  6. Click the Review project task.

    The My tasks page is displayed.

  7. Add a review comment and click Accept to continue with the next step in the workflow, and continue until you have completed all tasks in the workflow.

You have run an Activiti process definition as a workflow in Alfresco Share. My tasks, My workflows pages, and the associated Alfresco Activiti for this Alfresco Share site can all be accessed from the Tasks menu.

1.1.3. Creating rules

You can create rules to manage folders in an Activiti process similar to Alfresco One. There are two ways to create rules in Activiti Share Connector:

The Activiti options are listed under the Perform Actions option. Follow the steps detailed in the above topics in Alfresco docs until you reach the Activiti specific actions (under More Actions), and then continue as below.

To create rules specific to an Activiti process:

  1. Create a rule or link to an existing rules set as explained in Creating a rule.

  2. In the New Rules dialog > Perform Actions list, select Start Activiti Process to initiate an Activiti process from Alfresco One.

  3. Clicking Start Activiti Process displays an Options button. You can customize the rule with the following options:

    • Process Definition - Select from the predefined process definitions based on where you want to apply the rule to.

    • Process Name - Enter a process name for your rule.

    • Content form field - Select content for attaching a content type field in the form.

    • Additional form fields - Select additional criteria for the rule such as Assignee, Due Date, Task Description, Message, and add their values. To select more than one criteria, click + (plus icon).

  4. You can also select from the following Other Options:

    • Disable rule - Turns off any existing rules.

    • Run applies to subfolders - Applies the rule to this folder and all its subfolders.

    • Run rule in the background - Runs the rule in the background. You can also select an action to run if an error occurs with the rule. These actions are set up by your Administrator.

  5. Click Create or Create and Create Another to save this rule and start creating another one.

The rule is applied to the selected folder and displayed on the Rules page. Once a rule is added, the following options become available:

  • Inherit Rules - Use for applying rules to inherit from a parent folder. You can turn the rule on and off by clicking on it.

  • New Rule - Click to add more rules to a folder as you need in the same way as you would add new rules. See Creating rules for more details.

  • Run Rules - Click to manually run the rules on existing folder items or subfolders at any time.

2. Installing Activiti Share Connector

2.1. Introduction

Activiti Share Connector comes packaged with a set of Alfresco customizations distributed as 2 AMP (Alfresco Module Package) files, one for the Alfresco repository and the other for the Alfresco Share Web application. It enables you to run certain parts of the Alfresco Activiti’s Task user interface inside Alfresco Share. From version Activiti 1.3.2, you can connect Activiti to Alfresco One repositories without additional configuration to user profiles in Activiti (applicable only if the users also exist in Alfresco One).

2.2. Features

This version of Activiti Share Connector has the following features:

  • Integrated UI - The Activiti user interface for working with processes and tasks is embedded into Share’s user interface exposing processes from the Activiti app named Review Processes. When selecting people and documents, the native Alfresco Share components are used.

  • Review Processes - The Activiti Review Processes app, shipped since Alfresco Activiti 1.2.2, will be available from within Alfresco Share, including 4 processes: Ad hoc Task, Group ad hoc task, Review and Approve - Group and Review and Approve - Single person.

  • Site Specific Processes - You can change the default process for a Site to display a specific Process App in Activiti by adding an aspect included in Activiti Share Connector to the Site’s documentLibrary folder. For detailed steps, see Changing the default process for a site.

  • My Activiti Tasks dashlet - Lists new tasks created using Activiti Share Connector. You can filter tasks by: Active Tasks, Completed Tasks, Tasks Due Today, Tasks Assigned to Me, Unassigned (Pooled Tasks), Overdue Tasks.

  • Starting processes - Clicking Start workflow in the Document Library, Document details page, and My Activiti Tasks will create new external Activiti processes instead of the old internal workflows in Alfresco.

  • Activiti Task list view - Clicking the My Tasks page lists new external Activiti tasks using the Activiti user interface.

  • Activiti Process list view - Clicking the Processes page lists new external Activiti processes using the Activiti user interface.

  • Customized Alfresco Share header - The Alfresco Share header’s menu links point to new Activiti pages for processes and tasks instead of the old pages. A link to the Activiti user interface will also become present in the same menu.

  • You can still reach your old internal workflows and create new ones:

    • The original My Tasks dashlet is still available, making it possible to list old internal workflows but also receive new site invitations.

    • The original My Tasks page can still be accessed by clicking the Internal Tasks link on the new Activiti My Tasks page, making it possible to continue working with the internal workflows.

    • The original My Workflows page can still be accessed by clicking the Internal Workflows link on the new Activiti Processes page, making it possible to continue working with the internal workflows.

    • The original Start Workflow page can still be accessed by clicking the Start Workflow link on the new Activiti Start Process page, making it possible to continue creating new internal workflows.

    • The Workflows panel on the Document details page will list both internal and external workflows.

2.3. Production Setup

This section describes how to install the connector in a production environment. To get it up and running as quickly as possible, read the instructions in the Demo Setup.

2.3.1. LDAP

Alfresco One and Alfresco Activiti require a common LDAP user database for the integration to work. After setting up your LDAP server, you must configure Activiti and Alfresco One to use it so that they can sync their user database against the LDAP server.

2.3.2. Alfresco One

LDAP settings

For detailed instructions on how to get LDAP running with Alfresco One, read:

For a working example of an Alfresco One LDAP subsystem, check the LDAP demo provided in the activiti-share-connector.zip. The amp file (only) contains sample LDAP configuration files for getting Alfresco setup up with an LDAP (it contains no Activiti Share Connector files) configuration.

For example:

  1. Unzip the activiti.alfresco.repo-demo-ldap-X.X.X.amp file by renaming it from .amp to .zip. Notice the files, particularly the ones marked with ACTIVITI SHARE CONNECTOR DEMO in the ldap-authentication.properties file.

  2. Configure the ldap-authentication.properties file to match your LDAP settings, and then, zip the files again and rename it back to .amp before dropping into your Alfresco One’s amps folder.

Note: When zipping the files, follow the same structure as the original .amp file and make sure that no new root folders are introduced to the new .zip file.

Deploying AMPs

If you don’t already have an Alfresco One server installed, then install one of the following versions: 4.0, 4.1, 4.2 or 5.0.

From activiti-share-connector.zip, copy the amps to the correct amps folder in your Alfresco One installation:

  • <zip>/alfresco/amps/activiti.alfresco.repo-X.X.X.amp to <alfresco-dir>/amps

  • <zip>/alfresco/amps_share/activiti.alfresco.share-X.X.X.amp to <alfresco-dir>/amps_share

Install the amps into Alfresco One by running the following command on a terminal from within your Alfresco One installation directory, and then follow the instructions:

bin/apply_amps.sh

2.3.3. Modifying the default settings

Activiti port

The default settings assume that Activiti is running on http://127.0.0.1:8080/. If so, you don’t have to do anything.

If you have Activiti running on another domain or port (i.e. 9090), you can override the default setting by adding the following line at the bottom of your <alfresco-tomcat>/shared/classes/alfresco-global.properties file in Tomcat, where your Alfresco One repository is located:

1
activiti.domain=http://127.0.0.1:9090
Alfresco One repository
Modifying the default integration name

You can modify the default Alfresco integration name by setting the value of activiti.alfrescoRepositoryName. This value must correspond to an Alfresco One repository configured in Activiti. The default name for the integration is alfresco-1, however you can modify it, if required.

  1. Locate the alfresco-global.properties file located at <alfresco-tomcat>/shared/classes>:

    activiti.alfrescoRepositoryName=alfresco-1
  2. Modify the value after the hyphen (-) with a number that matches the Id of the repository. The repository Id is available as a column in the Activiti app > Activiti Identity Management app > Tenants > Alfresco Repositories list.

Modifying the Activiti app name

You can modify the Activiti app name to display the same app name in Share by modifying the following value in the alfresco-global.properties file:

activiti.appDefinitionName=Some Custom App
Setting the secret key

When Alfresco One communicates with Activiti, it sends a secret token and username to Activiti and switches it for user specific Activiti token.

To override the default secret token, simply specify an activiti.secret property in the alfresco-global.properties file.

activiti.secret=my-custom-secret

The secret token must match the Repository secret field for your Alfresco repository in the Activiti Identity Management app.

The secret token appears in clear text, therefore, to avoid saving it like that:

  1. Override the value (and all other Activiti properties) using Alfresco One subsystems and JMX.

  2. To connect to an Alfresco One Server using JMX, see:

  3. Once connected, navigate to /Alfresco/Configuration/Activiti/default/Attributes and modify the value for activiti.secret.

2.3.4. Alfresco Activiti

Install Alfresco Activiti (version 1.2.2 or higher) using the standard installer.

Note: Make sure that your Activiti app has a license in place. You can install the license manually in tomcat/lib, or by starting Activiti and adding it via the UI (see the Activiti Administrator’s Guide > Uploading a license from the User Interface (UI) section.

Configuring the LDAP settings

You can find the LDAP settings for Activiti in the activiti-ldap.properties file located here:

webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-ldap.properties

The default configuration works with the sample LDAP settings provided with the installation bundle, however you can easily override them by creating a new file called <activiti-tomcat>/lib/activiti-ldap.properties, and override the properties that requires changing.

For further details about configuring LDAP for Activiti, see the External Identity Management (LDAP/Active Directory) section in the Administrator’s Guide.

Alfresco One settings

To configure Alfresco One settings in Activiti, you must perform the following steps:

  • Enable Activiti Share Connector

  • Add an Alfresco Repository

Enabling Activiti Share Connector

By default, Activiti’s bundled Review Processes app is not created. To create one, add the following file into the <activiti-tomcat>/lib/activiti-app.properties (requires a restart).

# Enable the Alfresco Share Connector process app
app.review-workflows.enabled=true
Adding an Alfresco Repository

You can add an Alfresco repository from the Identity Management app in Activiti.

To add an Alfresco Repository:

  1. Start your Activiti server and login as administrator.

  2. Open the Profile Management (Identity Management) app, and click Tenants tab > Alfresco Repositories.

  3. In the Alfresco Repositories section, create a repository pointing to the Alfresco One server and Activiti Share Connector. Following is an example of the form assuming you are running Alfresco One on the same machine and on port 8080:

    Field Value

    Name

    Acme’s Alfresco Server

    Alfresco tenant

    Tenant name to use in Alfresco. When left blank, it uses the default tenant (-default-).

    Repository base url

    http://127.0.0.1:8080/alfresco/

    Share base url

    http://127.0.0.1:8080/share/

    Alfresco Share connector

    (enabled)

    Secret

    activiti-share-connector-secret

Note: Once the repository is created, you can see your new repository in the Alfresco Repositories list. If the id set to 1, you are good to go and all default values are fine. However, if it is set to something else, for example, 1002, you must stop the server and make sure your Id appears as alfresco-1002 in the following files, and then restart your servers:

  • In Activiti’s tomcat/shared/classes/alfresco-global.properties - Override the default by adding a new line with activiti.alfrescoRepositoryName=alfresco-1002

  • In Alfresco’s tomcat/lib/activiti-app.properties - The property named integration.login.alfresco-1.secret should be named integration.login.alfresco-1002.secret

In addition, to make this repository work for features such as Publish to Alfresco or browse Alfresco for documents from Activiti, verify the following:

  • A user has a user account for the repository

  • The Alfresco server being used is of version 4.2 or above

Changing the default process for a site

You can change the default process name for a site to the exact same name as the Process App’s name. The easiest way to do this is to follow these steps: 1. From the Repository view in Alfresco One, navigate to the desired site’s documentLibrary folder. 2. From the Site Details page, click More > Manage Aspects action and add the Activiti Process App aspect. 3. Edit the folder properties and enter the name of the Process App in the Process App Definition Name field.

Where:

Aspect Id = abs:activitiProcessApp

Property = abs:appDefinitionName

Alfresco One troubleshooting

To see debug messages from Activiti Share Connector:

  1. Rename the custom-log4j.properties.sample file in the following location:

    tomcat/shared/classes/alfresco/extension/
  2. Remove the .sample suffix, and add the following line:

    log4j.logger.com.activiti.alfresco=debug
Alfresco One 4.0 & 4.1 changes

The Activiti Share Connector AMP uses a distributed memory cache implemented in Alfresco One to make sure it works in a clustered environment. This behavior has changed since Alfresco One 4.2, which means, to make Activiti Share Connector work with Alfresco One 4.0 or 4.1, you must modify the settings in the following file: /tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/activiti.alfresco.repo/module-context.xml

Comment out the current activitiTokensCache bean and activate the section with the 4.0 or 4.1 version of the same bean.

2.4. Demo Setup

2.4.1. Installing Alfresco One

  1. Install Alfresco One (5.0 or above) using the installer in Advanced mode. For Tomcat Port configuration, make sure you bump up each port by 10, for example, 8080 to 8090 and so on.

  2. After the installation is complete, start Alfresco One using the Application Manager app located in the Alfresco One home folder.

  3. Verify if Alfresco One works on http://127.0.0.1:8090/share/, logout, and stop just the Tomcat Server in the Application Manager app.

  4. Copy the following files from the activiti-share-connector.zip to their corresponding folders inside the Alfresco One installation directory:

    • <zip>/alfresco/amps/activiti.alfresco.repo-X.X.X.amp to <alfresco-dir>/amps

    • <zip>/alfresco/amps/activiti.alfresco.repo-demo-ldap-X.X.X.amp to <alfresco-dir>/amps

    • <zip>/alfresco/amps_share/activiti.alfresco.share-X.X.X.amp to <alfresco-dir>/amps_share

    • <zip>/alfresco/tomcat/webapps-ldap (copy the folder) to <alfresco-dir>/tomcat

    The webapps-ldap folder is maintained separately to ensure that it boots up before Alfresco One and becomes available when Alfresco One tries syncing its database against the LDAP server.

  5. To configure the webapps-ldap folder to get picked up and run before webapps by Tomcat, copy the xml snippet in <zip>/alfresco/tomcat/conf/server-ldap-snippet.xml into your <alfresco-dir>/tomcat/conf/server.xml and make sure it’s placed above the existing <Service> element.

  6. Install the amps into Alfresco One by running the following command on a terminal from your Alfresco One installation directory, and then follow the instructions:

    bin/apply_amps.sh

    Note: With the standard installs you are likely to have OutOfMemoryExceptions due to Perm Gen space issues if you run Java 1.6 or 1.7. To prevent this, edit tomcat/bin/setenv.sh or equivalent and make sure to set XX:MaxPermSize to 512M as follows:

    JAVA_OPTS="-XX:MaxPermSize=512M -Xms512M -Xmx8192M $JAVA_OPTS"

2.4.2. Installing Activiti Share Connector

Follow these steps to install Activiti Share Connector:

  1. Install Alfresco Activiti (1.2.2 or higher) using the installer.

  2. Verify the database configuration. By default, the demo H2 database is used, therefore you might want to configure Activiti to use the same database as your Alfresco One installation.

    • Typically, you should create a new database schema for Activiti to use, and then configure Activiti as described in the Activiti Administration’s Guide > Database Configuration section.

  3. Make sure your Activiti app has a license installed. You can add a license file manually to the Tomcat/lib directory, or load it through the user interface (Activiti 1.5 onwards).

    To load a license file from the UI, see the Activiti Administrator’s Guide > Uploading a license from the User Interface (UI). Make sure you sign out from Activiti and stop the Activiti server.

  4. To use the same demo LDAP server, copy the following file from activiti-share-connector.zip into its corresponding folder in the Activiti installation directory:

    <zip>/activiti/tomcat/lib/activiti-ldap.properties_ to _<activiti-dir>/tomcat/lib
  5. Uncomment or add the following lines at the bottom of the tomcat/lib/activiti-app.properties file inside the Activiti installation folder.

    # Enable the Alfresco Share Connector app
    app.review-workflows.enabled=true

2.4.3. Start the servers

  1. From the Application Manager, restart Alfresco One to restart the Tomcat Server. To ensure that the Alfresco One server has fully started, check the Application log and wait for the INFO: Server startup in XXXX ms message.

  2. After the Alfresco One server and the demo LDAP server have started, run Activiti as instructed by the installer and navigate to the Identity Management app http://127.0.0.1:8080/activiti-app/idm/.

  3. Log in with admin/password defined in the demo LDAP.

  4. Go to the Tenants page > Alfresco Repositories tab, and add a repository pointing to your Alfresco One server:

Field Value

Name

My Alfresco server

Alfresco tenant

Tenant name to use in Alfresco. When left blank, it uses the default tenant (-default-).

Repository base url

http://127.0.0.1:8090/alfresco/

Share base url

http://127.0.0.1:8090/share/

Alfresco Share connector

(enabled)

Secret

activiti-share-connector-secret

Notes:

  • The default secret is the text activiti-share-connector-secret, which can be changed to a different value in Alfresco One’s alfresco-global.properties by the property activiti.secret. See Setting the secret key for more details.

  • After the repository is created, you can see your new repository in the Alfresco Repositories list. If the ID is set to 1, then all default values are fine. However, if it is set to something else, e.g. 1002, you must stop your servers and make sure your ID appears as alfresco-1002 in the following files and then restart your servers:

  • In the alfresco-global.properties file (under Alfresco One), override the default setting by adding a new line, substituting the ID as appropriate:

    activiti.alfrescoRepositoryName=alfresco-1002

2.4.4. Use it!

Note: Make sure that LDAP is running before you start Alfresco One and Activiti so they can sync their user databases against the LDAP server.

  1. View Alfresco Share on http://127.0.0.1:8090/share/ and Activiti on http://127.0.0.1:8080/activiti-app/

  2. Login as a user that exist in the demo LDAP system:

    Username Password Activiti role Alfresco role

    jluc

    password

    tenant manager

    user

    kirk

    password

    tenant admin

    user

    wesley

    password

    user

    user

    admin

    password

    admin

    admin

    Note: The password for the admin user is password instead of the credentials used for installing Alfresco One. This is because the password set in the demo LDAP server is applicable for users.

  3. On your Alfresco One personal dashboard page, click the Tools icon and add the My Activiti Tasks dashlet.

When logging into Activiti as an admin, you can view the Process definitions and Review Processes app inside the Kickstart application by selecting the Shared with Me filter.

2.4.5. Activiti Administrator Application

You can use the Activiti Administrator application with the Demo Setup, however you must first update the Activiti endpoint in the Activiti Administrator app.

To update the Activiti endpoint:

  1. Sign in to the Activiti app with the default admin/admin credentials:

    A message appears indicating that an error occurred while getting data from the server.

  2. Click Edit Activiti REST endpoint and set the Username to admin and Password to password, then click Save.

    A confirmation message appears confirming that the endpoints were successfully updated.

3. Integrating Activiti with Alfresco One

Alfresco Activiti integration with an Alfresco One server supports the following type of communication:

  • Browse Alfresco sites and their documents within the Activiti UI

  • Publish documents to Alfresco

  • Download documents from Alfresco

  • Preview of downloaded document in the Activiti UI

This section provides details to achieve the integration between the two applications.

3.1. How Alfresco Activiti communicates with Alfresco One

Activiti uses the CMIS REST bindings available in Alfresco and the OpenCMIS client library to communicate with Alfresco One. When connecting to Alfresco One it uses the org.apache.chemistry.opencmis.client.runtime.SessionFactory.createSession(Map<String, String> parameters) method.

Use the following parameters for user credentials:

parameters.put(SessionParameter.USER, username);
parameters.put(SessionParameter.PASSWORD, password);

If an Alfresco user account for the Alfresco repository is already defined inside the Alfresco Activiti’s Identity Management app, then the username and password of that user account will be used.

However, if there is no user account defined and the Alfresco repository configuration in the Identity Management app is configured to use the Connector, then Alfresco Activiti will pass a secret key with the Alfresco username to Alfresco to create an Alfresco ticket. The Alfresco username is defined in the EXTERNAL_ID column of the USERS database table.

The secret key can be retrieved by calling a REST service (webscript) in Alfresco, which was deployed when installing the Connector module in the Alfresco repository, using the following http call:

POST http://alfrescoserver.com/alfresco/service/activiti/sso/alfresco-ticket
{
    "secret": "activiti-share-connector-secret",
    "username": "kermit"
}

‚Äč…​which will return 200 with the following response body…​

{
    "ticket": "abc123"
}

When Activiti receives this ticket, it will use the string "ROLE_STRING" (instead of using a "real" username) as the user parameter and the ticket as the password parameter:

parameters.put(SessionParameter.USER, "ROLE_TICKET");
parameters.put(SessionParameter.PASSWORD, ticket);

In addition, Alfresco Activiti uses Alfresco’s Public API (i.e. when listing sites for a user) and regular http calls with basic auth. For an existing user account, the username and password are specified in the same way. However, if Activiti Share Connector is configured for the repository, use the constant ROLE_TICKET as the username and the ticket received from Alfresco as password with basic auth.

4. Disclaimer

While Alfresco has used commercially reasonable efforts to ensure the accuracy of this documentation, Alfresco assumes no responsibility for the accuracy, completeness, or usefulness of any information or for damages resulting from the procedures provided.

Furthermore, this documentation is supplied "as is" without guarantee or warranty, expressed or implied, including without limitation, any warranty of fitness for a specific purpose.