wso2 / streaming-integrator-tooling

Apache License 2.0
45 stars 33 forks source link

File source default parameters conflict in design view #46

Open sybernix opened 4 years ago

sybernix commented 4 years ago

Description: In file source the following 4 parameters are left as mandatory.

  1. file.uri
  2. dir.uri
  3. move.after.process
  4. move.after.failure

However, only one of the first two should be given i.e either file.uri or dir.uri but not both. move.after.process should only be given if action.after.process is move. By default it is set to delete. The same issue with move.after.failure.

The actual issue is in (siddhi-io-file) Siddhi annotations. We don't have support for the following in annotation;

  1. specifying either this or that parameter should be given but not both
  2. Tree-Structured parameters. Based on the value of one parameter, another parameter is mandatory

Suggested Labels: Type/Bug, Severity/Critical

Affected Product Version: streaming-integrator-tooling-1.0.0, siddhi-io-file-2.0.3

Steps to reproduce:

  1. Create a new Siddhi app in streaming-integrator-tooling
  2. Navigate to the design view
  3. Drag and drop a source and a stream
  4. Connect source to stream and configure stream
  5. Click open the configuration panel of source and select file type
Screen Shot 2019-11-21 at 12 16 33 PM

As seen in the screemshot it asks for all the 4 parameters mandatorily

dnwick commented 4 years ago

@sajithshn to fix this ideally we need to fix the annotations. But we can treat file sink/source as an exception and handle the logic in client side . WDYT ?