Plone Workflow: How to check for multiple attributes of an object? - workflow

In our project we would like to have a workflow which checks whether all three signatures (implemented through booleans) have been added to an object of type "Project" before it continues to the next state.
Unfortunately this doesn't seem to be possible while editing the workflow through the web and we haven't been able to find it in the documentation either.
How would we do it?
Thank you very much for any assistance.

Use the transition Guard expression to check for this:
python: here.getFirstBoolean() and here.getSecondBoolean() and here.getThirdBoolean()
This can be access through the ZMI:
append /manage onto site root
go to "portal_workflow"
click the "contents" tab
click on the workflow you're using
click the transitions
you should see the area for a guard expression
You could put the login into a Script in the custom folder also if you wanted to make it easier and do it all TTW.

Related

Course completion report is not working properly it showing the wrong output

i am trying to implement the course completion status block in my moodle to check this i made a student account in that status is showing pending and also other status is not working correctly i give the course completion setting and activity completion setting. And if i click on "More Details" this page is opening (picture 2) in which it also showing incomplete and complete the quiz and pass also still it showing incomplete.
And after this i check in admin from course report so this also reflecting there, in (picture 3) self completion and course complete is unmarked.
I need this to check the student is complete the task properly so i can provide the certificate to him "not custom certificate".
So Anyone could please suggest something?
First of all you have to check that your cron file is working or not for that go to administration>server>scheduled task in that check for the completion regular task is working if not then first work for you cron then it will automatically work.
And your self completion is still not responding after that this is because you didn't add the self completion so add this block and manually complete the course and then it will properly.
For cron i suggest you only go for moodle docs only and then implement it.

How can I set an Item as Default in Variant-Management's manage dialogue?

I'm using:
SAP UI5 version 1.38.8
sap.ui.comp.variants.VariantManagement
My problem is that I can't set an item programmatically so that the item is shown as 'selected' in the management dialog.
It works in the select dialogue (or popup), as shown below:
However, it doesn't work in the "variants manage" dialog, as you can see in here
Unfortunately, I need to use version 1.38.8 (because of restrictions by customer's environment). Any ideas how to solve this problem?
Solution:
variantManagment.setDefaultVariantKey(item.VariantId);
after Variants were loaded.
I don't know why it didn't work at my first tries.

Set workflow model id (path)

When I create a new workflow model in AEM, it gets created under /etc/workflow/models. How do I get it to be created under a different path like /etc/workflow/models/myapp ? The only way I can think of is changing the path in CRXDE after the workflow gets created. Wanted so if there is a better way to do this.
Better way to move workflow to another place would be:
go to /miscadmin#/etc/workflow/models
use button "Move..."
Unfortunately, it seems, that there is no easy way to change place, where worflows, which are created through UI, are stored. To do this you should:
override "/libs/cq/workflow/widgets/source/widget/ModelsPanel.js" in you project, where you can find action this.newAction, where you will be able to change propery parentPath to /etc/workflow/models/myapp. But you can run into troubles after upgrading to another version of AEM.
also you can be interested in service Granite Workflow Service where you can set (through /system/console/configMgr) path to your models, which should be shown in Workflow Console /libs/cq/workflow/content/console.html. (Also it's applicable to CQ 5.6.1, for some older versions, you should configure Day CQ Workflow Service).

Cocoa invoke Service, do not overwrite Pasteboard

I have created a Service in Cocoa which grabs the selected Text and sends the result back to my Main App, so i can handle it there ( Couldn't find any other way to get current selection), now that the Service works and appears in the Service Menu, i tried to invoke the Service from my parent App to get current selection, after some goggling around i found this snippet:
NSPasteboard *pboard = [NSPasteboard pasteboardWithUniqueName];
[pboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
NSPerformService(#"PCB", pboard);
This one works as far as it triggers my Service, the Problem here is it redefines the NSPasteboard, so my service doesn't get the selected text, but a NIL Value Pasteboard which is blank, how can i prevent this?
And does someone know how to convert a .service bundle into an .app bundle that performs itself and sends the data and kills itself after finish?
thx for help
You want to get the text that is selected in another application, right? Probably in the front application, while your app is in the background.
For this to work, you'd have to have the Service be invoked by the front application. If you invoke it from your app in the background, it can't access the front app's text field that contains the selected text. Instead, it'll try to find a text field in your own app's responder chain (I believe – someone correct me if I'm wrong on this detail).
But for your code to run in the app's process, you'll have to inject it somehow, which is - out of security concerns - mostly prohibited by OS X, and especially with sandboxed apps.
There are ways to accomplish code injection, one that 1Password and other popular tools use it through an osax extension. But that's an entirely different topic.
Once you have your code running inside the other app's process, you should be able to copy the selected text (provided it's a Cocoa app) with [NSTextView writeSelectionToPasteboard:types:]. I haven't tested this myself, though, so this is just an assumption.

In CQ5, my responsive emulator devices list is empty

To start, I followed these directions exactly as it's stated: http://dev.day.com/docs/en/cq/5-6/developing/mobile/responsive.html
The problem is, despite all of that, my Devices dropdown on the sidekick in preview mode is empty.
The list works without issue in the Geometrixx Media without issue.
I made sure I set the cq:deviceGroups and the sling:OsgiConfig as required, and also included the simulator.js in the head tags.
Edit: I have found that if I set the resourceType on the root level page to geometrixx-media/components/page, which is their working demo, it works. I have completely removed all jsp and config items from that component page and it still continues to work anyways.
Does anyone know of something that is missing from the documents, and how to fix the issue?
Thanks.
This is what I did to resolve this issue:
I am going to assume your application name is jason-riis
In CRXDE|Lite create a config folder in /apps/jason-riis/
Now create a node of:
TYPE=sling:OsgiConfig
NAME=com.day.cq.wcm.mobile.core.impl.MobileEmulatorProvider-<*alias>
*alias could be anything, I gave my application name. What it does is it will get you a unique PID when you look at it in configuration Manager
If you go to your configuration manager now, you should be able to see two MobileEmulatorProvider config settings.
Add a node property to node you just created:
NAME=mobile.resourceTypes
TYPE=String[] (you have to click multi at the end of the value textbox)
VALUE=jason-riis/components/<*page>
*page is all the components that has sling:resourceSuperType of foundation/components/page and it is a multi array so it should look like this
jason-riis/components/page, jason-riis/components/widepage, jason-riis/components/newspage
I assume you already have the cq:include for simulation in your header. This makes the devices button appear in preview mode.
Last thing is, go to your website root page's jcr:content [/content/jason-riis/jcr:content] and add node property
NAME=cq:deviceGroups
TYPE=String[]
*VALUE=/etc/mobile/groups/touch, /etc/mobile/groups/smart
*If you go to this etc path in CRXDE|Lite; you will see more relevant information in jcr:content node. This will help you in creating your own custom emulator list.
You should be able to see the dropdown now, with options of iPhone and iPad and all. I know AEM docs are frustrating, let me know if there is any confusion.