Skip to content

Conversation

@SamuelMuloki
Copy link
Contributor

Add Nanoflow support

README.md Outdated
## Features and limitations

* Adds timed behavior to your applications.
* Nanoflow support starts from Mendix 7.13.1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run a Microflow or Nanoflow

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to mention version number as it will not be compatible < 7.13.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

README.md Outdated
@@ -1,28 +1,32 @@
# MicroflowTimer [![Support](https://img.shields.io/badge/Mendix%20Support%3A-Platform-green.svg)](https://docs.mendix.com/community/app-store/app-store-content-support)
# ActionTimer [![Support](https://img.shields.io/badge/Mendix%20Support%3A-Platform-green.svg)](https://docs.mendix.com/community/app-store/app-store-content-support)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space, not camel case "Action Timer"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

<description>If true (and execute once is false), the microflow or nanoflow will be invoked the first time if the widget has loaded. If false, the microflow or nanoflow will be invoked the first time after interval has passed</description>
</property>
<property key="callEvent" type="enumeration" defaultValue="callMicroflow">
<caption>Call event</caption>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to Timer event

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

nanoflow: null,
firstIntervalAttr: null,
intervalAttr: null,
timerStatusAttr: null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

post create add an error message when Timer event action does not have correct config (conditional required, microflow or nanoflow)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used mendix default mx.ui.error("Error occured")

} else if (this.callEvent === "callNanoflow" && this.nanoflow){
this._executeNanoFlow()
} else {
mx.ui.error("No action specified for " + this.callEvent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To late, should be mentioned in postCreate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

_executeEvent: function() {
if(this.callEvent === "callMicroflow" && this.microflow) {
this._execMf()
} else if (this.callEvent === "callNanoflow" && this.nanoflow){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DANGER! never just test this.nanoflow this will always return true, as it is an object ALWAYS check this.nanoflow.nanoflow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
}),
error: lang.hitch(this, function(error) {
mx.ui.error("An error ocurred while executing nanoflow" + error.message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also log this error to the logger.error so the error is shown in the console of the runtime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

mx.ui.error("An error ocurred while executing microflow" + error.message);
})
};
if (!mx.version || mx.version && parseInt(mx.version.split(".")[0]) < 7) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verison stuff, can be removed as this widget is no longer will run < 7.13.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

src/package.xml Outdated
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="MicroflowTimer" version="3.1.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="ActionTimer" version="3.2.0" xmlns="http://www.mendix.com/clientModule/1.0/">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be major update, as this version will only run on mx 7.13 and up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to 4.0.0

@JelteMX JelteMX merged commit 000ccf7 into mendix:master Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants