Generating switch-case function out of State chart - rhapsody

Although my question is very simple I can't find an answer for it.
I created a class in Rhapsody and associated a statechart to this class but when I generate the code I can't find and code in the class related to the state chart.
Is there any function that needs to be created as a trigger or am I missing something?
my example state chart:

After searching for a long while I could find the option that was preventing the generation.
First of all, you need to define a reactive class to be able to generate a code for a state machine. This point was OK for me and I thought this was only what matters until I found this property here:
The _CG::Statechart::StatechartStateOperations property
determines whether the code is generated for this feature. The
possible values for this property are:
None (default value) where code is not generated for the feature.
WithoutReactive where the product does not generate calls to OMReactive
WithReactive where the product generates calls to OMReactive

Related

R Shiny: Does the Input object store the type of input

I'm trying to create a parameter file for my app that the user can upload to re-populate all input fields with the inputs they had used in a previous session.
I know I can get the names and values of all the inputs using reactiveValuesToList(input), but does the 'input' object store the kind of input (text, slider, radioButtons, etc.) anywhere? I'm hoping that there's an easy way to identify the type so I can use the correct update*Input function without using a daisy chain of tryCatches.
Also, is there any way I can learn more about the structure of the input object? Using str(input) isn't really helpful, and I was wondering if there was any good documentation on what all the parts mean and where to find it.
Most of the advanced features of shiny can be found in one of the articles here:
https://shiny.rstudio.com/articles/
You can also find the reference here for all the functions:
https://shiny.rstudio.com/reference/shiny/latest/
What you are trying to do is very similar to bookmarking your app. It is possible that the functionnality you are looking for is already implemented:
https://shiny.rstudio.com/reference/shiny/latest/enableBookmarking.html
Otherwise, if it does not do the trick, you can use session and the onSessionEnded function to save a table with your parameter as it is when closing then use that table to initialise your parameter when the user connect again.

Dealing with view implicit acquisition problems in Plone

In Plone adding a member variable in a view class instance automatically makes it a part of view acquisition chain. The problem is described in detail here:
http://collective-docs.readthedocs.org/en/latest/views/browserviews.html#views-and-automatic-member-variable-acquisition-wrapping
What is the suggested approach for dealing with this problem
Can we have Plone main template based views without implicit acquisition
How about viewlets and portlet renderers then?
If not... how one should deal with the problem so that self.xxx variables do not get extra acquisition wrapping?
Use Acquisition.aq_inner() to strip away the extra wrapping and restore the object to it's original path. Please, do not use the single-item list approach as described in the document you link to.
To show one example from the linked document, but corrected with aq_inner():
from Acquisition import aq_inner
self.obj = self.context.reference_catalog.lookupObject(value)
return aq_inner(self.obj).absolute_url() # Acquistion chain corrected
Alternatively, you can use the aq_inner attribute:
self.obj = self.context.reference_catalog.lookupObject(value)
return self.obj.aq_inner.absolute_url() # Acquistion chain corrected
but that only works on objects that inherit from Acquisition.Explicit or Acquisition.Implicit; the aq_inner() function returns the passed argument verbatim if it is not a Acquisition-wrapped object.

setting distinguished fields in a biztalk message

The issue:
I'm trying to transform and route a message based on its input file name. The file name gives hints about how the data should be processed. Being a noob I'm reasonably sure I'm doing this the hard way...
I created an orchestration. I transform the message from the input schema to the output schema. I'd like to examine the file name and add a little logic to classify the input message. That works just fine.
What I tried:
I added an expression shape after the transformation. I added logic to classify the message and assign that to a property. It won't allow me to change the property (messages are immutable?)
I added a construct message shape. I can set properties in a new message within this shape but it doesn't allow "if" statements or conditional assignments in the expression. I need conditional logic to search the file name string and set the property to one of several choices.
Any suggestions?
You can either wrap your logic into a .net helper method and call this from the assignment shape, or you can use the conditional flow control shapes provided by biztalk, such as the decide shape, and have multiple contruct shapes in your branches.
Let me know if you need more detail about either approach via a comment and I will expand the answer to include.
Hope this helps.
You could use a helper class to take the file name and return the value to set in the property.
Alternatively, you could use the decide shape for your if..then..else.
Have I understood your question?
HTH...

DataService.commitRequiredOn() recursive check?

We're using LCDS and the "commitRequiredOn" method in the DataService class to check if there are pending changes for an entity. However, it seems like "commitRequiredOn" does not check the complete graph of an object, but just the object itself. For now, we have implemented a recursive check on the complete object graph, but this seems like functionality that should come out of the box.
Am I missing something here, or is there just no built-in way to recursively check an entity to see if it's dirty or not?
I can confirm that commitRequiredOn is checking only the objects itself. But there is also the property DataService.commitRequired (and this is checking for all the objects managed by the dataservice) - maybe you can use it.

XtraGrid doesn't display properly newly added line

I'm using XtraGrid of DevExpress 2.9.5 to display a blotter of dynamic set of lines. The blotter is integrated into another application, this is why it has to be based on UserControl class and also implement a couple of custom interfaces.
public partial class BlotterForm : UserControl, ISMMdiEmbeddable, ISMAssociatedMFCWindow
{
private BindingList<BlotterTrade> fDeals;
....
}
As the data is binded to control using BindedList, any change should be reflected in the form automatically. And if I try to add new line to fDeals like follows:
public void AddDeal()
{
fDeals.Add(new BlotterTrade(1,2,3));
}
... i can see the line, but it's content is rubbish.
I tried to do the same in a small test application. It works ok with only difference that the blotter in test application is based on DevExpress.XtraEditors.XtraForm. To me it looks now that the form of original blotter doesn't overload some method or miss some event. But I cannot find out what exactly is missed.
Can somebody tell me what I do wrong or don't do?
Thanks.
A couple of things:
BindingList doesn't always work too well with DevExpress, and it's suggested to use XPCollection instead.
Do you have any more info about how you setup your columns in the xtragrid? If you use incorrect field names in the column, then they won't show what you're looking for.
If the params you're using (1, 2, 3) are ids stored as fkeys to other objects (not sure if you're using xpo or not) then they won't show up correctly either (there'll likely be a '+' in the cell instead of any values).
[aside] be sure that blottertrade implements INotifyPropertyChanged for better interaction with the grid.
Thanks to everybody for the answers and comments. I think I sorted out the problem. It was actually related to interaction between native C++ and C# layers in my application. The object that was supposed to be displayed in XtraGrid was created in C++ layer, the grid was displayed asynchronously with object construction/deconstruction, that's why at the moment when the grid was ready to display it, the object itself didn't exist. Hence the rubbish. It's good the grid itself was not crashing or firing exceptions.

Resources