1
0
-1

Hi All 

I need to modify the task data to mask some fields depending on a user access level in a SAML authentication, so I was wondering if I can run a prefill service is run on a task or should i do it through a security filter?

Kind Regards

Kev

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Kevin,

      You should be able to run a Form Prefill Data service in this scenario to modify the form XML data.

      To do this update the schemaSeed XML document parameter which is passed into the Form Prefill Data service.  For example:

      import com.avoka.component.xml.XmlDoc  
      def email = ...
      def xmlDoc = new XmlDoc(schemaSeed)  
      xmlDoc
      .setText('/AvokaSmartForm/Contact/Email', email) 
        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Kevin,

        Is the task created through collaboration job? if so, you will need to invoke prefill service through action property of Task. I believe once task is assigned, its treated as saved form and prefill service wont invoke when users opens up the task.

        1. Unknown User (diana.pattenden)

          Hi Nirmal Solanki I need this for my project. Can you please give me sample code?

        2. Unknown User (ppandya)

          Hi Unknown User (diana.pattenden) please see the action property details form the doco below. This will go into the collaboration job configuration as an additional property.

          Task Input XML Prefillthe input pre-fill data XML which is mapped into the form XML data using prefill input XPath mappings. This property value is ignored for 'Anonymous' Task Types.{ "name": "Task Input XML Prefill", "value": "$func.invoke('Job Prefill Service', $job)" } 
        CommentAdd your comment...