Dashboard > Tempo > ... > FAQ > Attachment Service > View
Tempo Log In   View a printable version of the current page.
Attachment Service
Added by Nicolas Modrzyk, last edited by Nicolas Modrzyk on Sep 09, 2009

Task Attachment Service

Description

There is a service called TAS (task attachment service).
This service is responsible of delegating the attachment for tasks. What it does is handling:

  • the authentication to add/delete files
  • handling the location of the storage of the files (WDS by default, Sling, and Alfresco in the EE of BPMS).
    Its default url is at: http://localhost:8080/axis2/services/tas?wsdl
  • deleting files, based on their urls

Configuration

The tempo-tas.xml contains the definition of the service, meaning

  • a storage strategy
    • locates where the file is actually stored (Sling, WDS ... and other implementing the org.intalio.tempo.workflow.tas.core.StorageStrategy
    • handles the metadata and store it in the tempo database, in 3 tables through object persistence:
      • tempo_attachment,
      • tempo_attachment_map,
      • tempo_attachment_meta
  • a security strategy
    • that checks who can upload what

Methods

  • add, adds a new file to the task attachment service. This is also used by the file upload mechanism.
  • delete, delete a file, based on its URL. The file is actively deleted, and unless the underlying storage policy does something clever (versioning ...) , the file is deleted for good.

WDS

WDS is the component responsible for storing items, and is the default StorageService proposed in Tempo.
It is a bare minimal implementation of a somewhat restful storage service build over OpenJPA.
The file tempo-tas.xml has the following default section for WDS based storage:

  ...
  <bean id="tas.storageStrategy" class="org.intalio.tempo.workflow.tas.core.WDSStorageStrategy">
      <property name="endpoint"><value>http://127.0.0.1:8080/wds/</value></property>
  </bean>
  ...

Note: You can update the base url by changing the endpoint.
Meaning that all the items stored in WDS will have a base url of *http://127.0.0.1:8080/wds/* and appended the relative path of the uploaded item.

Custom Storage Service

Implement a new Task Attachment Service

In the tempo-tas.xml configuration file, remember:

..
<bean id="tas.storageStrategy" class="org.intalio.tempo.workflow.tas.core.WDSStorageStrategy">
..

You can just switch the implementation to a new class.
The class has to implement the StorageStrategry interface, and be integrated in the tempo-tas***.aar axis2 service.

FileSystemStorageStrategy

This has been implemented as the most basic example to implement your own Storage Strategy. The tempo-tas.xml would have a section like this:

    ..
    <bean id="tas.storageStrategy" class="org.intalio.tempo.workflow.tas.sling.FileSystemStorageStrategy">
      <property name="path" value="/tmp"/>
      <property name="publicPath" value="http://localhost/~home"/>
    </bean>
    ..

This has been implemented in TAS (tas-service subproject of tempo) since version 6.0.0.71.
You need to deploy the .aar file in the axis2 webapp of your server.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 1.4.1 Build:#212 Jun 02, 2005) - Bug/feature request - Contact Administrators