BHoM / BHoM_Adapter

GNU Lesser General Public License v3.0
7 stars 7 forks source link

Adding recorderror message to the default Execute method #342

Closed alelom closed 1 year ago

alelom commented 1 year ago

Issues addressed by this PR

Closes #207

Test files

0 2 2 1 0 7 3af2bd3f-3481-4c36-86c2-ae08e5a9c947 Shaded 1 100;150;0;0 100;0;150;0 638115567792076234 unnamed 0 1654 138 1.38178146 0 0 1 BH.UI.Grasshopper, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null 6.0.0.0 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf BH.UI.Grasshopper 6.0.0.0 4 d45ad8e8-cf03-464c-ba89-2122f4c6e4fa 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf Execute Adapter Action 'Execute': sends commands to be executed in an external software b78f3e1e-7529-4de0-abca-e5170dd9abe5 Execute Execute 697 155 149 84 783 197 true 4 72194041-4e06-4e8c-bbeb-36fd484907e0 ffe324e7-1fc0-4818-9fcb-43a0202cc974 ffe324e7-1fc0-4818-9fcb-43a0202cc974 cb95db89-6165-43b6-9c41-5702bc5bf137 2 d67b6cf3-37ea-438e-a6b4-2cc76b572658 cb95db89-6165-43b6-9c41-5702bc5bf137 Adapter to the external software This is a BH.Adapter.BHoMAdapter afa3c9d9-6803-4ba2-8cb3-dc49dc1c2d57 adapter adapter { "_t" : "System.Type", "Name" : "BH.Adapter.BHoMAdapter, BHoM_Adapter, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null", "_bhomVersion" : "6.1" } false 1e0601c7-0c62-4530-82ff-330f79ba864d 1 false 10000 699 157 69 20 735 167 true Command to run This is a BH.oM.Adapter.IExecuteCommand: Classes implementing IExecuteCommand are commands compatible with the `Execute` Adapter Action. This can be of the following types: DownloadCommand, RenameCommand, MoveCommand, CopyCommand, Bake, UpdateCommand, UpsertCommand, Transfer, SaveAs, Save, Open, NewModel, Exit, CustomCommand, Close, and more... 387eabde-032d-4666-9a7c-f6f8204f3588 command command { "_t" : "System.Type", "Name" : "BH.oM.Adapter.IExecuteCommand", "_bhomVersion" : "6.1" } false bd520e2c-0d2e-4e05-b9bb-b633237f8c1f 1 false 10000 699 177 69 20 735 187 true Configuration for this Action. You can input an ActionConfig (it contains the configs common to all Toolkits); consider that Toolkits may have a custom ActionConfig (e.g. GSAConfig, SpeckleConfig). This is a BH.oM.Adapter.ActionConfig: Configurations specific for an Adapter Action (Push, Pull, etc). Consider that your tookit might have a more specific implementation available. Try to look for [your toolkit name]ActionConfig. f6bb31d8-0930-4d87-b3df-8e411769499e actionConfig actionConfig { "_t" : "System.Type", "Name" : "BH.oM.Adapter.ActionConfig", "_bhomVersion" : "6.1" } true 0 false 10000 699 197 69 20 735 207 true Execute the command This is a Boolean 286a5941-3d47-4e7f-9e19-7c56ad3a0636 active active true ff1c217a-b769-4e18-b549-cf14c6899e73 1 699 217 69 20 735 227 true 1 1 {0} false 1 Output of the executed command. This is a Object 6c41cc3b-b45d-468f-b158-1cc704e15bb4 output output { "_t" : "System.Type", "Name" : "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "6.1" } true 1 0 6a184b65-baa3-42d1-a548-3915b401de53 false 10000 798 157 46 40 821 177 true True if the operation was successful. This is a Boolean 867af73c-87a2-4d8f-97be-9872e125ab6a success success true 0 798 197 46 40 821 217 true dd286cb5-2bc6-4c4a-aac5-542d1d0954b5 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf HTTPAdapter a1e520bf-0264-4f67-8960-c2cc7f9939ac HTTPAdapter HTTPAdapter 442 90 49 28 456 104 true 0 1 72194041-4e06-4e8c-bbeb-36fd484907e0 This is a BH.Adapter.HTTP.HTTPAdapter 1e0601c7-0c62-4530-82ff-330f79ba864d H H { "_t" : "System.Type", "Name" : "BH.Adapter.HTTP.HTTPAdapter, HTTP_Adapter, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null", "_bhomVersion" : "6.1" } false 0 false 10000 471 92 18 24 480 104 true 2e78987b-9dfb-42a2-8b76-3923ac8bd91a Boolean Toggle Boolean (true/false) toggle ff1c217a-b769-4e18-b549-cf14c6899e73 Boolean Toggle Toggle false 0 true 445 280 104 22 true 76221701-c5e7-4a93-8a2b-d34e77ed9cc1 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf ClearResults { "SelectedItem" : { "_t" : "System.Type", "Name" : "BH.oM.Adapter.Commands.ClearResults", "_bhomVersion" : "6.1" }, "InputParams" : [], "OutputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "50a5820f-8a37-4944-9a72-8c5420cd8438", "Name" : "C", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "BH.oM.Adapter.Commands.ClearResults", "_bhomVersion" : "6.1" }, "Description" : "This is a BH.oM.Adapter.Commands.ClearResults:\r\nUsed to instruct the external software to clear/delete results from a file or model.", "Kind" : "Output", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : true, "IsSelected" : true, "DefaultValueWarning" : "" }], "BHoM_Guid" : "d6504001-3066-44fb-8f78-41b6a47cfbe4", "_bhomVersion" : "6.1" } This is a BH.oM.Adapter.Commands.ClearResults: Used to instruct the external software to clear/delete results from a file or model. 6d58b386-366f-46d0-b4d3-6e1257bee2bb ClearResults ClearResults 496 212 48 28 510 226 true 0 1 ffe324e7-1fc0-4818-9fcb-43a0202cc974 This is a BH.oM.Adapter.Commands.ClearResults: Used to instruct the external software to clear/delete results from a file or model. bd520e2c-0d2e-4e05-b9bb-b633237f8c1f C C { "_t" : "System.Type", "Name" : "BH.oM.Adapter.Commands.ClearResults", "_bhomVersion" : "6.1" } false 0 false 10000 525 214 17 24 533.5 226 true

Changelog

Additional comments

FraserGreenroyd commented 1 year ago

@BHoMBot check compliance

bhombot-ci[bot] commented 1 year ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `code-compliance` - check `documentation-compliance` - check `project-compliance` - check `branch-compliance` - check `dataset-compliance` - check `copyright-compliance` There are 13 requests in the queue ahead of you.
FraserGreenroyd commented 1 year ago

@BHoMBot check core @BHoMBot check null-handling @BHoMBot check serialisation

bhombot-ci[bot] commented 1 year ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `core` - check `null-handling` - check `serialisation` There are 7 requests in the queue ahead of you.
FraserGreenroyd commented 1 year ago

@BHoMBot check versioning

bhombot-ci[bot] commented 1 year ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `versioning`
FraserGreenroyd commented 1 year ago

@BHoMBot check versioning

bhombot-ci[bot] commented 1 year ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `versioning`
FraserGreenroyd commented 1 year ago

@BHoMBot check ready-to-merge

bhombot-ci[bot] commented 1 year ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `ready-to-merge`