Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-3650

Unable to compose XD module with several transform processors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: To Do
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: DSL
    • Labels:
      None
    • Story Points:
      0
    • Rank (Obsolete):
      9223372036854775807

      Description

      Hi,

      I'm trying to create a composed module with two transform processors:

      module compose --name my-module-prepare --definition "filter-events:transform --script=myscript.groovy --propertiesLocation=myscript.properties | transformer | change-body:transform --expression=payload.getValue()" --force
      

      After I use this module into my stream:

      stream create --name MY_STREAM --definition "topic:MY_TOPIC > my-module-prepare | mongodb"
      

      But when I'm trying to deploy I get this error:

      Field error in object 'target' on field 'valid': rejected value [false]; codes [AssertTrue.target.valid,AssertTrue.valid,AssertTrue.boolean,AssertTrue]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.valid,valid]; arguments []; default message [valid]]; default message [the 'script' and 'expression' options are mutually exclusive]
      

      After some investgiation, it appears that module properties for both transform module seems to be merged so I've this in the instance of _ExpressionOrScriptMixin_ :

      expression	"payload.getValue()" (1) 	
      propertiesLocation	"myscript.properties" (2)	
      script	"myscript.groovy" (2)	
      

      1 : correspond with change-body:transform properties
      2 : correspond with filter-events:transform properties
      3 : correspond with filter-events:transform properties

      So the method org.springframework.xd.module.options.mixins.ExpressionOrScriptMixin.isValid() cannot succeed.

      I'm using Spring XD in a distributed environment with Zookeeper, RabbitMq & Redis for analytics.

      Is there a way to deploy this king of composite module?

      Thanks for any help

      Mickaël

      P.S: is this rlated to https://jira.spring.io/browse/XD-3010 ?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mgervais GERVAIS Mickaël
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: