Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[File Connector][Delete]No valid message is provided when there are no files existing of the specified file type to delete #1447

Open
isuruuy429 opened this issue Apr 23, 2020 · 0 comments

Comments

@isuruuy429
Copy link
Contributor

Steps to reproduce:

  1. Create the following API in the WSO2 Integration Studio.
<?xml version="1.0" encoding="UTF-8"?>
<api context="/connect" name="Connect" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST" uri-template="/delete">
        <inSequence>
            <property expression="json-eval($.source)" name="source" scope="default" type="STRING"/>
            <property expression="json-eval($.filePattern)" name="filePattern" scope="default" type="STRING"/>
            <fileconnector.delete>
                <source>{$ctx:source}</source>
                <filePattern>{$ctx:filePattern}</filePattern>
            </fileconnector.delete>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>
  1. Invoke the API by specifying a folder where it does not exist the specified types of files in the filePattern in the payload.
    eg: If my payload is as below, in the 'new` folder, do not include any JSON file.
{
	"source":"/Users/IsuruUyanage/Desktop/RnD/2020/Q1/ConnectorVerification/wso2-extentions/docs3/FileConnectorTesting/test/read/new",
	"filePattern":".*.json"
}

Expected: It should provide an error message saying that the specified type of file does not exist and return false.
Actual: It returns true and no error message provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant