Business processes don`t correctly call scorecard? - drools

I want to use business process call scorecard,but it is not work,Someone knows why not?
The following is my project content
business central:7.73.0
kie server:7.73.0
1、Data Objects
ScoreVariable: age Integer、enterpriseType String、finalScore double
2、Guided Score Cards
3、Business Processes
I call scorecard through Business Rule and ruleflowgroup is specified,i successfully deployed the project to kieserver,called successfully through postman, but did not return the expected value.
Can someone help me with this? Thank you very much

Related

IBM Assistant(Conversation) Error: SpelEvaluationException when evaluating dialog node ID

I have a flow in my chatBot application where I switch workspaces and its giving me SpelEvaluationException error.
I have a router workspace that determine initial indent of the client, once I know the initial intend I route the next request to appropriate workspaces
Workspace Router :
Bot :- Hey this is an awesome bot, what do you need help with
1. Apples
2. Bananas
3. Oranges
Client :- I need help with my apples
--- I pass a custom JSON from the workspace with tells my app to route next request to apples workspace ----
Apple Workspace :
BOT: Hey what can I help you in apples .
The flow works fine but when I send request to Apples workspace. I get the following error in log_message .
SpelEvaluationException when evaluating dialog node ID [node_2_1517933972148]. The syntax of condition [intents[0].confidence < 0.50] is valid, but cannot be evaluated. Check that objects in expression are not null or out of bounds.\nSpEL evaluation error: EL1025E: The collection has '0' elements, index '0' is invalid\n
So somehow you are asking Watson to evaluate the intents array before actually passing any input, so no intent data is returned, thus the spell expression fails and throws the error.
So however you are calling that second Apples workspace make sure you have input text being sent as well.
The same thing happened to me, you can try to jump by response so that the condition is not evaluated and check if you are not trying to save the intent in a variable inside the JSON. Possibly you already solved it but I leave my proposal hoping it will serve someone else.

Can I enable / Disable an Azure Service Bus Topic using Powershell

I have spent a couple of hours search for a solution to disable my Azure Service Bus Topics using Powershell.
The background for this is we want to force a manual failover to our other region.
Obviously I could click in the Portal:
but I want to have a script to do this.
Here is my current attempt:
Any help would be great.
Assuming you're sure your $topic contains the full description, modify the status parameter in the array and then splat it back using the UpdateTopic method. I'm afraid I can't test this at present.
$topic.Status = "Disabled"
$topicdesc = $NamespaceManager.UpdateTopic($topic)
I don't think you'll need to set the entity type for the Status, nor do you require semi-colons after each line of code in your loop.
References
PowerShell Service Bus creation sample script (which this appears to be based off): https://blogs.msdn.microsoft.com/paolos/2014/12/02/how-to-create-service-bus-queues-topics-and-subscriptions-using-a-powershell-script/
UpdateTopic method: https://msdn.microsoft.com/en-us/library/azure/microsoft.servicebus.namespacemanager.updatetopic.aspx
Additional note: please don't screenshot the code - paste it in. I'd rather copy-and-paste than type things out.

Alfresco: How to see the data of a finished task in the next task?

I need pass data of a task1 (form of task1) to other task (form of task2), and see this data in the form of task2. I use one aspect for this and I have the next code (a part) for the taskListener (event: complete) in task1:
execution.setVariable('wf_data1', task.getVariable('wf_data1'));
In my task2, in the share-config-custom.xml, I have the wf_data1 in the form, but this shows empty.
Why happen this? How to see the wf_data1 in task2?
UPDATE:
The reason of why this not working is which in the file service-context.xml, the redeploy key is "false". I changed this to "true" and all is working.
Greetings,
Arak.
I'm not going to dive into your model and ways of showing it. Alfresco keeps track of the workflow history. I'm not sure till what detail(with/without aspects) is available, but it's quite easy to find out.
With this you can access workflow data in a next task. Just create a custom workflow form controller which retrieves data.

Is it possible to configure Quartz RAMJobStore and JDBCJobStore in single java application

I am creating a quartz java program with simple trigger using JDBCJobStore, my requirement is to process a method with the dynamic value entered by the user everytime by scheduling it with user specified given time and date which is also obtained from the user interface screen.
eg: public void execteMe(String name, int age, Date dob) {
system.out.println("Name:"+name+" age:"+age+" DOB:"+dob);
}
I am new to quartz scheduling. I know how to do this with RAMJobStore, but JDBCJobStore very new to me, someone please help me with your examples for me to proceed further. And also I would like to know whether it is possible to use RAMJobStore and JDBCJobStrore in single java application.
It is possible to have multiple schedulers in a single Java application. Here is the link explaining how to do that.

Magento Automatically send tracking email

OK, been searching this everywhere, and can't come up with anything... we are externally populating tracking numbers in Magento Community 1.7.0.2 via a sync program from Dydacomp's Mail order Manager software... - it closes the order in Magento and adds a tracking number, but does not trigger the send tracking email function in mage. - I have researched, and seen that there are observers, etc. which appear maybe to be able to do this, but after 20 hours scouring every blog I can find, etc. cannot come up with anything that works!
This link seems to be REALLY in the right direction... but where to put this block of code? I've tried putting it in all kinds of places and none works:
Programmaticly send email when shipping tracking number is set
Any help would be tremendously appreciated.
I developed something similar. I created a module activated by cron (once a day) that checks the last orders that have 'delivered' (complete status).
To run a function in your cron magento module, add to your config.xml
<crontab>
<jobs>
<myModule_myFunction>
<schedule><cron_expr>*/60 * * * *</cron_expr></schedule>
<run><model>emailtracker/cron::myFunction</model></run>
</myModule_myFunction>
</jobs>
</crontab>
For the order to have supplies you can use the following code snippet
$orders = Mage::getModel('sales/order')->getCollection()
->addFieldToFilter('status', 'complete')
->addAttributeToFilter('created_at', array('gteq' => $dataForFilter));
Note that the collection of orders that I created, I make filter by date to avoid retrieving all orders already made​​.
With my collection of recent and complete orders that are possible candidates to receive a tracking email delivery, I can actually work with the orders that are important.
I created a foreach to run in my collection and within that loop, retrieve the tracking number.
foreach($orders as $order) {
$trackings = Mage::getResourceModel('sales/order_shipment_track_collection')
->setOrderFilter($order)
->getData();
for($i=0;$i<count($trackings);$i++) {
$trackingNumber = $trackings[$i]['track_number'];
//Make your php magic here
}
}
From this point, you can work this information the way you want. You can create a function that checks the status of tracking number via API and its delivery service sends an email, or you can imagine.
Important: Remember to check if your magento cron is active.
Note: I did it in Magento 1.6.1.0