Azure Logic Apps - How to Disable Service Bus and Recurrence Triggers in VS Code when developing locally? - azure-logic-apps

I am developing a new Logic App in VS Code and created some workflows with Service Bus and Recurrence triggers.
When I run the project, I don't want some of these workflows to run and therefore require selectively disabling them.

By adding below setting in local.settings.json file, you can disable logicapps.
"Workflows.yourworkflowname.FlowState" : "Disabled"
Have created a project in VS code and added two workflows as shown below,
Added configuration in local.settings.json file as shown below,
Once added both recurrence and service bus triggers are not running as shown below,
Note: Here recurrence trigger should run for every 10 sec. As it is in disabled state, recurrence trigger is not triggered.

Related

Can I run multiple logic app from single master logic app

Hi I have 16 logic app which load file from share point but I need to run all those separately.
Is there any way can I run all those 16 logic app from one master logic app.
Yes you could, the logic app support create the "child" Logic App. Then you could call nested Logic Apps directly from Logic Appps Designer.
If you want to run them in parallel, you could choose Add a parallel branch then call child Logic Apps.
Firstly ,your child Logic Apps need to be set with Manual – When an HTTP request is received trigger. Then go to the parent logic app add an action and search Logic App, then choose the Logic Apps you want.
About the details you could refer to this doc:Azure Logic Apps: Call nested Logic Apps directly from Logic Apps Designer.
Hope this could help you, if you still have other questions,please let me know.

Do you have to manually restart Gatsbyjs every time you post?

I'm using Gatsby.js. It seems like every time I write a new markdown post I have to stop and restart Gastsby with CTL+C and then npm run develop. Is that the normal procedure? It makes it hard to add content if I'm stuck doing that every time.
When adding posts the dev server automatically updates (no need to restart your dev server) I'm guessing it's a custom implementation issue. try following the official tutorial https://www.gatsbyjs.org/tutorial/part-four/ and see how it works for you.
note: the only reason to restart the server relates to changes (e.g. adding a new plugin) you do in your gatsby-config.js

Setting build mode flags in angular app

I have a scenario in my angular app where I want to set some properties based on whether the app has been built in debug or release mode from a build task in my gulp file.
Basically I have code that should only be run when the app is built in debug mode (some code that uses the $interval service).
All I can think of right now is setting an angular constant to say what mode the app is running in, but it would mean changing it each time I want to build for debug or production\release mode. It would be nice if I can somehow get the build tasks to set some global that the client side angular app can get at.
I'm using Express as well, so I did wonder if maybe an environment variable could somehow be supplied to the client side code?
Has anyone encountered a similar situation and can offer suggestions for a suitable solution?

Auto populate table after portlet is deployed in liferay

I need a way to automatically populate a table created by the service builder of a portlet that is deployed in liferay. How can I accomplish that? I was thinking of a startup hook, but I won't be able to access the service of the particular portlet. So is there a way to populate it through the portlet itself ?
If you manage to not make the changes destructive (e.g. be careful not to populate on every startup) you can do it in a StartupAction (or startup hook). You can add this hook to your portlet project - this works just fine. Alternatively you could declare a hook to be dependent on a portlet (or vice versa) in liferay-plugin-package.properties - this will make the services available. But for this purpose, I'd just package everything in one portlet plugin.
If you might have destructive changes in there, an Upgrade Action will be a safer bet: This is guaranteed to run only once.
For examples see the old sevencogs sample (let me know if you need pointers, then I'll get them out)
Update: To include such a hook in a portlet project, add WEB-INF/liferay-hook.xml with the following content (or use Liferay IDE's wizard to just add a hook to the project)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.1.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd">
<hook>
<portal-properties>portal.properties</portal-properties>
</hook>
Also, create WEB-INF/src/portal.properties with the following option
application.startup.events=com.example.MyStartupAction
and, of course, create the mentioned startup action, extending com.liferay.portal.kernel.events.SimpleAction
Try by deleting an entry from servicecomponent table. And redeploy your portlet.
delete FROM servicecomponent where buildNamespace="<your table namespace>"

Is there a way a method can be triggered or run during a salesforce package installation process?

I would want to do this to run post installation setup process like adding custom data that is required for the application to run.
One option I am aware of is to Write Installation and Setup instructions for users. Create visualforce page and include a button on this page. Redirect user to this page as the process of Installation and ask the user to click the button.
I only wanted to know If there was a more elegant way to solve the problem and if there is a way to call a method during the installation process.
Salesforce has recently implemented the ability to execute scripts (as Apex) during package Install / Uninstall:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_install_handler.htm
No, we can't have a post installation script for the app. What you are saying is best solution, just keep a custom setting to flag, if initial setup is not done, then redirect to the setup page first, other wise do the normal work.
My question would be revolving around why you need custom data for the app to run? One of the things Salesforce look for when doing a security review of your code and the unit tests you have is to check to see if you are requiring data in your org as this is bad practice. Note that if your app is requiring specific data to run then it cannot be tested properly as the data will not be in the org when running the tests on install.
What is the data you are requiring? Could it be stored in an xml like static resource file or something similar for you to load and parse as it is needed?
Paul

Resources