[MNT-20020] APS 'Retrieve Alfresco Properties' task sets date types to string types Created: 25-Sep-18  Updated: 27-Feb-20

Status: Open
Project: Service Packs and Hot Fixes
Component/s: APS Kickstart/Studio
Affects Version/s: Alfresco Process Services 1.9.0.3
Fix Version/s: Alfresco Process Services .N

Type: Service Pack Request
Reporter: Jennie Soria [X] (Inactive) Assignee: APS Team
Resolution: Unresolved Votes: 0
Labels: Content-Storage, London, triaged_Jul2019
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

APS 1.9.0.3


Attachments: PNG File IssueActiviti-AdminView.png     Zip Archive Modele_Facture.zip     Zip Archive TestACSMetadataMappingPrinting.zip     PNG File logprintout.png    
Issue Links:
Cloners
Related
relates to MNT-18630 APS Some process variable data types ... Open
relates to MNT-18226 Date variable is incorrectly set to a... Open
Bug Priority:
Category 1
ACT Numbers:

00973333


 Description   

Summary

When you use the 'Retrieve Alfresco Properties' task, with 'date' type fields/variables, both defined on ACS and APS side, the variables are set a type 'string' not 'date'.

Replication Steps

(ACS)

  • using CMM import the attached content model ( Modele_Facture.zip ) into ACS
  • create/upload content in site for user that is also in APS
  • change content type to facture type form CMM
  • edit and set properties for custom model on the content

(APS)

  • import attach APP ( TestACSMetadataMappingPrinting.zip )
  • make sure your ACS is included in your IDM tenant
  • make sure the user is the same one as in ACS
  • make sure user pass/login for ACS is defined in their profile
  • edit the process start form, attach from acs field(s), select your ACS endpoint and location for files
  • save, publish/deploy APP
  • start process
  • select file from ACS with type/properties for each field
  • start process
  • check log output in console, script task is logging variable values, all the dates from the 'Retrieve Alfresco Properties' highlighted in yellow

(APS activiti-admin)

  • go to process instance view variables

    Note:
    those from 'Retrieve Alfresco Properties' are highlighted in yellow
    those from the form field mapping are highlighted in green
  • all date fields from the 'Retrieve Alfresco Properties' are type 'string' not 'date'
  • all the date fields from the form field limited to Alfresco only source mapping are 'date' as expected

Expected Behavior

  • When using 'Retrieve Alfresco Properties' task, the variable type should be type 'date' when mapping a 'date' type (date/datetime) content model property from ACS to 'date' type variable in APS

Actual Behavior

  • When using 'Retrieve Alfresco Properties' task, the variable type is type 'string' when mapping a 'date' type (date/datetime) content model property from ACS to 'date' type variable in APS

Work Around

This is only applicable IF the selection is restricted to Alfresco endpoint and not 'all file sources' on form 'attach file' field.
This is only useful for a few use cases.

  • On the form for the 'attach file' field, selet source as a Alfresco endpoint
  • This allows mapping immediately of the Alfresco properties to process variables, you will not need the 'Retrieve Alfresco Properties Task'
  • This also provides 'date' and 'datetime' variable types

Additional Information

  • (likely main src issue) The date variable is incorrectly set to string with "REST API" ref: MNT-18226.
  • Process variables do not provide all the possible variable types ref: MNT-18630 (choices are only: string, integer, boolean, people, group, date)
  • The variable types in the form field map of attach file from Alfresco actually is different to the Process global variable types, (choices are : date, datetime, number, string, boolean). BUT form field type options includes 'datetime', whereas process variable only has date type.

Generated at Mon Jul 13 18:11:44 BST 2020 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.