Create a Folder or a Document in Oracle Content and Experience Cloud Using Process in Oracle Integration Cloud

Use the Document Start event to model a process that can be initiated by a document. Use the Folder Start event to model a process that can be initiated by a folder.

Before you can create one of these processes, you must have an Oracle Content Management account, and you must configure a connection between that service and your Oracle Integration.

By enabling the Oracle Content Management integration, you can define folders that will be created automatically on Oracle Content Management for every process instance, providing a predefined organization of the documents involved. You can also override the access type at the task level to define the right permissions for the folder or document for a particular task, based on your business needs. For example, you might want to prevent users from viewing a classified document or folder that’s associated with a task.

Note these access requirements for a successful integration:

  • To be able to start a process, the Oracle Content Management user who is configured in Oracle Integration must have full access to the folder (that is, the folder of the incoming document) that’s configured in Oracle Content Management.

  • For a folder-initiated process (that is, a process with a Folder Start event), the Oracle Content Management user who is configured inOracle Integration must have manager access to the folder in order to access it in Oracle Integration. For example, manager access is required to see the folder on the Task Details page and the Process Tracking page, to access the folder when embedding Process UI components in an external application, or to see the folder in the Process Mobile application.

  • To see a process in the process list for a folder, and to be able to initiate a process instance when a new document arrives, the Oracle Integration user who is configured in Oracle Content Management must be granted the process initiator role.

To design a process that can be started by a document or folder:

  • Define the Incoming Document or the Incoming Folder in Oracle Integration.

  • Model a process that has a document start event or a folder start event.

  • Customize its implementation to map the start event with the corresponding incoming document or folder that you created. Implementation options let you define the way in which the document or folder is exposed to users.

  • Optionally, modify which role can access the document or folder at the task level.

  • Configure the folder on Oracle Content Management to initiate a process when a document arrives.

Alternatively, you can use the REST API, and provide all the input values.

Define the Incoming Document or Folder

You can use the Documents page in Oracle Integration (Process Builder) to define an incoming document or folder.

Open the process application you’re modeling, and click Documents. The Documents page lists the incoming documents and incoming folders that have already been defined.

To create a new incoming document or folder, click New New icon, select the appropriate type, enter a name, and select the default access permission.

Model Processes That Can Be Started from Document or Folder Start Events

You can model a process in Oracle Integration that can be started from a document start or a folder start event.

Before you get started, add the document start or folder start event from the Elements palette. Only, the first, start event that you add to a process will be supported.

  1. On the Application Home tab, click Processes.
  2. Click New process New process icon to open the Create Process dialog box.
  3. Select None
  4. Enter a name for the process, make sure that the Open Immediately check box is selected, and then click Create.
  5. In the Elements Palette, click Events .
  6. Drag either the Document Start event or the Folder Start event to the canvas.
  7. Add a sequence flow from your new document or folder start event to the end event.
  8. Delete the empty start event.
  9. Continue to modify and define the process. Be sure to test and deploy it.

Enable User Roles to Start a Document or Folder Initiated Process

You can enable certain user roles to start a document or folder initiated process in Oracle Integration.

To enable a user role to upload a document to start a process:

  1. Open the process.
  2. In the swimlane with the document or folder start event, click the role name and then click Edit Edit icon.
  3. In the Role field, select Automatic Handler.

Customize a Document-Initiated or Folder-Initiated Process

After you model a process in Oracle Integration, you can add a start document or folder in a process and customize it.

To customize a document-initiated or folder-initiated process:

  1. In the process diagram, click Document Start or Folder Start event.
  2. Click MenuMenu icon, and select Open Properties.
  3. Define how you want to handle the incoming document or folder.
    • In Place: Selecting this value keeps the location of the document as it is. If you want, you can map the incoming document or folder to one of the predefined documents or folders for its management. (To do this, open the drop-down list.)

      If there isn’t a predefined incoming document or folder suitable for this particular process, then click New New icon to create one.

    • Unmanaged: The document or folder is ignored by the current process. Oracle Integration Cloud won’t show an unmanaged document or folder at runtime. It’s up to the process modeler to handle the incoming document or folder. For example, if you want to move the incoming folder or document to another location, then you can use an XPath expression to get properties, such as Id or Type, and pass the property information to a REST service.

Configure a Folder

To set a process to start automatically when a document is uploaded to a folder, you need to configure the folder on Oracle Content Management.

To configure the folder to initiate a process when a document arrives:

  1. Sign in to Oracle Content Management.
  2. Select the folder.
  3. Select Properties from the menu bar.
  4. Enable the Initiate process on document arrival setting.
  5. Select the process from the list.
  6. Click Save.

The folder and its subfolders are now available for use within the Oracle Integration interface. Any change to a file in the folder or any new file uploaded to the folder triggers the process associated with the folder. You can override the inherited process for a subfolder, but you can’t disable the association with a process.

When a file is uploaded from Oracle Content Management into a folder that’s configured for use with Oracle Integration, the file is used for the task that’s associated with that folder. Users in Oracle Integration can take any actions on the files there, such as approvals. When a task step is completed, the file can be moved or managed according to the defined process.

When Oracle Content Management starts a process, the payload sent to launch the process includes this information:

  • Document ID

  • Document name

  • ID of the user who started the process

  • Type

  • Role (indicates the role that should be used to generate subsequent application links)

  • Version

The following example uses only the document ID and document name for display in the form in Oracle Integration. In addition, it uses the document ID when it makes REST API calls to move or copy the file in Oracle Content Management into the task folder.

{
   "processDefId":"testing~UserFileApproval!1.0~FormApprovalProcess",
   "operation": "startEvent",
   "params": {
        "id": "D2806600E495B744E66BF3981212FF6185DE89BE6812",
        "type": "d",
        "name": "document-name",
        "startedBy": "user-id",
        "role": "role that should be used to generate subsequent applinks",
        "version": "version"
   }
}

As a developer, you must be aware of the following requirements for the process that you develop:

  • The process must use an Oracle Content Management Start event.

  • When you deploy the process, you need to share it with the user who is specified for enabling the integration. Otherwise, the user won’t have the rights to trigger the process.

  • For the user who uploaded the file to show up as the user who started the task, the process must use the value passed in the startedby field as the display name for the initiator.

  • If you enable the process integration for a folder, you need to share this folder with the Oracle Content Management user account that was used to enable the integration in Oracle Integration.