Custom Translator - Can't deploy more than 1 model (Model Action does not appear) - microsoft-translator

I have successfully created training with status = "Training succeeded" but not appear Model Action button to deploy/update.
enter image description here

You can only have one model deployed per project. To deploy this new model, you need to undeploy the one at the top that shows 'update'. If you want to have both deployed, they need to be in separate projects.

Related

Foundry Workshop - Prevent duplicate data entry

I am building a Workshop App which will be used for data entry by a large number of operational staff members (> 200).
I would like to implement the following set-up:
The staff will enter the data on existing Ontology Objects. To facilitate this, I embedded a Foundry Form into the Object View, and set-up a corresponding write-back data set.
The Ontology Objects in question will be displayed in an Object Table in Workshop.
The staff member will select an Object from the Object Table.
The selected Object will be opened in an Object View.
The staff member will enter data on the Object View (Foundry Form being displayed here).
I need to make sure that no concurrent data entry can/will happen. How can I achieve this?
I am thinking about removing any Object which is opened in the Object View from the Object Table, but I am not sure if this is the best solution to the problem or how to achieve the removal from the table.
I am assuming that this must be a common problem and there would be a Design Pattern/Standard Functionality to solve this.
You'll have the best behavior here if you replace your Foundry Form with Foundry Actions. These actions are defined in the Ontology Management App and provide a more robust security model for managing object edits and are more tightly integrated into the various object-layer tools in Foundry.
Then in your Object View, rather than using the Foundry Forms widget, choose to create a new "Workshop-backed" Object View tab - this option is under the dropdown next to the New Tab button - and within the Workshop module use the Inline Action Form to embed the action form that you've configured in the Ontology Management App, supplying the variable representing the current object as the default for the object parameter in the Action.
With regards to simultaneous edits, in Actions, when the form is populated (i.e. when that tab is opened), the version of the underlying object(s) are registered. When the edit request is submitted, the current version of the object is checked, and if the version is different (i.e. there have been edits applied since the form was loaded) the user will be presented with message to the effect that the object has been updated and the edits will not be applied.
This protects against the case of a user overwriting a near-simultaneous edit without reviewing the changes first and does so at the writeback layer, rather than with logic in your application front-end.
There is not currently an approach to reflect real-time user interaction between two Workshop sessions. For instance, there is no way for the session of User A to "know" that User B has opened Object X in their session and is making a change.
If you wanted to do something for a bit of convenience or display signaling, you could create a small object type related to your main object - something like "Edit Lock" that looks like:
| id | primary_object_id | user_id | timestamp | timeout
And then in your Workshop app, there's a button above the table that says "Edit Selected Object".
When you click this button, you trigger an Action to create a new "edit lock" object populated with the current user and the current timestamp and say a timeout of 15 minutes from now.
Then in the object view for the primary object in question, on the same tab where you have the edit form embedded, you can create a variable that gets the edit locks associated with that object via a search around and use a Function to create a boolean variable if there is an "active" edit lock. And use this to conditionally show a banner to the user or otherwise give them a visual indication that another user has indicated they're making changes.
This won't push to the other session, and it'd be just for display purposes, the real protection still comes from the underlying object versioning that Actions enforces, but it might be a nice user affordance to layer on top if you really expect to commonly run into this situation.

Document.Create.NewFamilyInstance not working generate in Design Automation For Revit

I want to generate scaffolding automatically by Design Automation but i have a trouble in Create.NewFamilyInstance.
So i'm using BuiltInCategory.OST_SpecialityEquipment into get FilteredElementCollector collector
FilteredElementCollector elementCollector = (new FilteredElementCollector(doc));
// Get Speciality Equipment
FilteredElementCollector col = elementCollector.OfCategory(BuiltInCategory.OST_SpecialityEquipment).OfClass(typeof(FamilySymbol));
And get FamilySymbol SpecialityEquipment to element Id
ScaffoldInfor scaffoldInfor = new ScaffoldInfor
{
Symbol = doc.GetElement(scaffoldId) as FamilySymbol
};
get the currently defined XYZ coordinates and use NewFamilyInstance(XYZ, FamilySymbol, StructuralType) to insert a new instance of a family into the document
FamilyInstance instance = doc.Create.NewFamilyInstance(currentPosition, scaffoldInfor.Symbol, StructuralType.NonStructural);
So when i started debug DesignAutomationFramework in local , it worked and generated scaffolding. But when i pushed on Design Automation API, it run success but not generate scaffolding.
Here is WorkItem ID : 97971783a94a482cb1c210f36b65ca86
Question : Why is it not working with Design Automation API but still working properly on local ?
Thanks!
after a closed look, the displaying issue I mentioned above is because the generated scaffolding's Phase Created is DIFFERENT from View's Phase. In the source code of addin, you can just simply add instance.CreatedPhaseId = selectedWall.CreatedPhaseId; after doc.Create.NewFamilyInstance..., so the generated scaffolding's Phase Created will be the same one as the hosted Wall. With this change, you will see the generated scaffolding in the result.rvt. Please let me know if any further questions or you want me to share the source code.

Animation when we click on a button created in RASA (actions.py file)

Is there any way where we can add animation on a specific button click in RASA. The buttons are created in actions.py file of RASA chatbot.
You'd need to have a custom frontend in order to do that. The code for the actual visual component of the chat doesn't come from Rasa (though it integrates with a few via connectors), so you can connect it to your own chat widget with animations on the buttons.
You can do this in custom actions. I believe you need to fetch that data from your DB. When the user asks give me mobile no. xx, first you need to capture the name of that person in a slot.
Then in your custom actions make your API call to the DB or however you want to fetch the user details. Use:
# Fetch the data and store in the format used by buttons.
buttons = [{"title": "Shakir Sadiq", "payload": "/intent_name"}, {"title": "Shakir Sadiq", "payload": "/intent_name"}]
dispatcher.utter_button_message("There are 2 people with the name Shakir:", buttons)
Once the user selects a button again trigger custom actions and fetch his details.

Mention user on description Microsoft Azure DevOps API

I'm Using Azure devops API to get the description of a Pull Request and then take that description and paste it into another workitem using update api
This is an example of the description that i copy
Take a look at the **#Susan mention **at the very bottom, this is how it looks on HTML:
My question here is if there is an API to bring the whole description formatted, because this is what i get as description when i use the GET API
"description": "Summary:\nSome modifications to fix an issue in
the **** DPIDs startup code. \n\nBefore:\nThe PID stream startup
function is called continously when the TCM is not
responding.\n\nNow:\nThe PID stream startup is only executed one
time.\n\nTo Test:\nUse the next ECU Emulator
branch:\n*********\nEnable the vehicle and disable the TCM
module. Run the ECU Emulator. Run the Auto Agent. Open the mobile app.
Check in the serial output that The DPIDs are started only
once.\n\n#<6D4D***297> Pulled down on 8/12/2020, no more
looping PID stream startup without TCM. Looks good.",
it would also be nice to know how to attach by this way an image, when i get the description it shows like this: ! [ image (2).png ](https://dev.azu re.com/*/ /_apis/git/repositories/ac324630-b697-4990-ac7a-cb82443762d2/pullRequests/390/attachments/image%20(2).png)**
API can only get data, it's not able to get the page style. You may add the link to access the page directly.

hyperledger composer & access security

I am currently building a network with a lot of different company with each one running a node.
The model is basically one big asset. A company might access couple of property and be restricted from other.
I saw that asset property permission is not possible.
The only solution I can see would be to create sub asset of that main asset and apply different permission and deny the possibility to host a node ?
Thanks a lot for your ideas & suggestions.
Jonathan.
Yes your solution work perfectly in case of a participant that does not host a node. However if the participant host a node It is now possible with a new feature implemented in Fabric 1.2: http://hyperledger-fabric.readthedocs.io/en/latest/private-data/private-data.html
Hyperledger Composer:
I suggest you to split your asset in smaller ones and implement the right access control for each one.
However you can implement specific logics in the transaction processor based on the identity / participant which is invoking the chaincode.
For example:
// Get the current participant.
var currentParticipant = getCurrentParticipant();
if (currentParticipant.getFullyQualifiedType() == 'org.example.ParticipantOfCompanyA') {
//do something
} else if (currentParticipant.getFullyQualifiedType() == 'org.example.ParticipantOfCompanyB') {
//do something else
}
Here the link to the official documentation:
https://hyperledger.github.io/composer/unstable/api/runtime-api#getcurrentparticipant
Hyperledger Fabric:
From Fabric v1.2 is possible to create private data between organizations on the same channel.
Here the link to the official documentation:
http://hyperledger-fabric.readthedocs.io/en/latest/private-data/private-data.html